Merged in feature/280-dev-dev01 (pull request #21)
auto-patch 280-dev-dev01-2024-01-19T16_41_58 * auto-patch 280-dev-dev01-2024-01-19T16_41_58
This commit is contained in:
@@ -212,7 +212,7 @@ if ( ! class_exists( 'WC_Admin_Profile', false ) ) :
|
||||
|
||||
$save_fields = $this->get_customer_meta_fields();
|
||||
|
||||
foreach ( $save_fields as $fieldset ) {
|
||||
foreach ( $save_fields as $fieldset_type => $fieldset ) {
|
||||
|
||||
foreach ( $fieldset['fields'] as $key => $field ) {
|
||||
|
||||
@@ -222,6 +222,25 @@ if ( ! class_exists( 'WC_Admin_Profile', false ) ) :
|
||||
update_user_meta( $user_id, $key, wc_clean( $_POST[ $key ] ) );
|
||||
}
|
||||
}
|
||||
|
||||
// Skip firing the action for any non-internal fieldset types.
|
||||
if ( ! in_array( $fieldset_type, array( 'billing', 'shipping' ), true ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Fieldset type is an internal address type.
|
||||
$address_type = $fieldset_type;
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_customer_save_address.
|
||||
*
|
||||
* Fires after a customer address has been saved on the user profile admin screen.
|
||||
*
|
||||
* @since 8.5.0
|
||||
* @param int $user_id User ID being saved.
|
||||
* @param string $address_type Type of address; 'billing' or 'shipping'.
|
||||
*/
|
||||
do_action( 'woocommerce_customer_save_address', $user_id, $address_type );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user