woocommerce_customer_stock_notifications_product_is_valid

FILTER woocommerce\src\Internal\StockNotifications\Utilities\EligibilityService.php (ligne 74) github
Filter: woocommerce_customer_stock_notifications_product_is_valid Allows custom validation for whether a product is generally eligible for notifications.

Paramètres

Entrée :
true, $product
Sortie :
@param bool $is_valid True if the product is valid for notifications, false otherwise.
@param WC_Product $product The product to check.
@return bool True if the product is valid for notifications, false otherwise.

Utilisation

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

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

Actualités

Chargement des actualités...