woocommerce_checkout_customer_id

FILTER woocommerce\includes\class-wc-checkout.php (ligne 173) github
Provides an opportunity to modify the customer ID associated with the current checkout process.

Paramètres

Entrée :
get_current_user_id(
Sortie :
@param int The current user's ID (this may be 0 if no user is logged in).

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_checkout_customer_id'
add_filter('woocommerce_checkout_customer_id', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(get_current_user_id() {
    // Modifier la valeur
    return get_current_user_id(;
}

Actualités

Chargement des actualités...