Filters whether hooks should be initialized for the current cart session.
true, $this
Sortie :
@param bool $must_initialize Will be passed as true, meaning that the cart hooks should be initialized. @param bool $session The WC_Cart_Session object that is being initialized. @returns bool True if the cart hooks should be actually initialized, false if not.
// Modifier la valeur avec le filtre 'woocommerce_cart_session_initialize'
add_filter('woocommerce_cart_session_initialize', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(true) {
// Modifier la valeur
return true;
}
Chargement des actualités...