woocommerce_after_save_address_validation хук-событиеWC 1.0

Hook: woocommerce_after_save_address_validation.

Allow developers to add custom validation logic and throw an error to prevent save.

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

add_action( 'woocommerce_after_save_address_validation', 'wp_kama_woocommerce_after_save_address_validation_action', 10, 4 );

/**
 * Function for `woocommerce_after_save_address_validation` action-hook.
 * 
 * @param int         $user_id      User ID being saved.
 * @param string      $load_address Type of address e.g. billing or shipping.
 * @param array       $address      The address fields.
 * @param WC_Customer $customer     The customer object being saved. @since 3.6.0
 *
 * @return void
 */
function wp_kama_woocommerce_after_save_address_validation_action( $user_id, $load_address, $address, $customer ){

	// action...
}
$user_id(int)
User ID being saved.
$load_address(строка)
Type of address e.g. billing or shipping.
$address(массив)
The address fields.
$customer(WC_Customer)
The customer object being saved. @since 3.6.0

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

WC_Form_Handler::save_address()
woocommerce_after_save_address_validation
woocommerce/includes/class-wc-form-handler.php 199
do_action( 'woocommerce_after_save_address_validation', $user_id, $load_address, $address, $customer );

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

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