woocommerce_customer_save_address
Hook: woocommerce_customer_save_address.
Fires after a customer address has been saved on the user profile admin screen.
Usage
add_action( 'woocommerce_customer_save_address', 'wp_kama_woocommerce_customer_save_address_action', 10, 2 );
/**
* Function for `woocommerce_customer_save_address` action-hook.
*
* @param int $user_id User ID being saved.
* @param string $address_type Type of address; 'billing' or 'shipping'.
*
* @return void
*/
function wp_kama_woocommerce_customer_save_address_action( $user_id, $address_type ){
// action...
}
- $user_id(int)
- User ID being saved.
- $address_type(string)
- Type of address; 'billing' or 'shipping'.
Changelog
| Since 8.5.0 | Introduced. |
Where the hook is called
woocommerce_customer_save_address
woocommerce_customer_save_address
woocommerce/includes/admin/class-wc-admin-profile.php 245
do_action( 'woocommerce_customer_save_address', $user_id, $address_type );
woocommerce/includes/class-wc-form-handler.php 223
do_action( 'woocommerce_customer_save_address', $user_id, $address_type, $address, $customer );
Where the hook is used in WooCommerce
woocommerce/src/Blocks/Domain/Services/CheckoutFieldsFrontend.php 47
add_action( 'woocommerce_customer_save_address', array( $this, 'save_address_fields' ), 10, 4 );