Hook: woocommerce_after_save_address_validation. Allow developers to add custom validation logic and throw an error to prevent save.
$user_id, $address_type, $address, $customer
Sortie :
@param int $user_id User ID being saved. @param string $address_type Type of address; 'billing' or 'shipping'. @param array $address The address fields. @param WC_Customer $customer The customer object being saved.
// Ajouter une fonction au hook action 'woocommerce_after_save_address_validation'
add_action('woocommerce_after_save_address_validation', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($user_id, $address_type, $address, $customer) {
// Votre code ici
error_log('Hook woocommerce_after_save_address_validation déclenché');
}
Chargement des actualités...