woocommerce_customer_save_address хук-событиеWC 8.5.0

Hook: woocommerce_customer_save_address.

Fires after a customer address has been saved on the user profile admin screen.

Использование

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(строка)
Type of address; 'billing' or 'shipping'.

Список изменений

С версии 8.5.0 Введена.

Где вызывается хук

WC_Admin_Profile::save_customer_meta_fields()
woocommerce_customer_save_address
WC_Form_Handler::save_address()
woocommerce_customer_save_address
woocommerce/includes/admin/class-wc-admin-profile.php 243
do_action( 'woocommerce_customer_save_address', $user_id, $address_type );
woocommerce/includes/class-wc-form-handler.php 219
do_action( 'woocommerce_customer_save_address', $user_id, $address_type );

Где используется хук в WooCommerce

Использование не найдено.