wc_product_pre_has_global_unique_id

FILTER woocommerce\includes\wc-product-functions.php (ligne 756) github
Gives plugins an opportunity to verify Unique ID uniqueness themselves.

Paramètres

Entrée :
null, $product_id, $global_unique_id
Sortie :
@param bool|null $has_global_unique_id Set to a boolean value to short-circuit the default Unique ID check.
@param int $product_id The ID of the current product.
@param string $sku The Unique ID to check for uniqueness.

Utilisation

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

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

Actualités

Chargement des actualités...