Loops through all of a users payment tokens and sets is_default to false for all but a specific token.
$token_id, $token
Sortie :
@param int $user_id User to set a default for. @param int $token_id The ID of the token that should be default.
// Ajouter une fonction au hook action 'woocommerce_payment_token_set_default'
add_action('woocommerce_payment_token_set_default', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($token_id, $token) {
// Votre code ici
error_log('Hook woocommerce_payment_token_set_default déclenché');
}
Chargement des actualités...