woocommerce_pre_delete_$this->object_type

FILTER woocommerce\includes\abstracts\abstract-wc-data.php (ligne 208) github
Filters whether an object deletion should take place. Equivalent to `pre_delete_post`.

Paramètres

Entrée :
null, $this, $force_delete
Sortie :
@param mixed   $check Whether to go ahead with deletion.
@param WC_Data $this The data object being deleted.
@param bool    $force_delete Whether to bypass the trash.

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_pre_delete_$this->object_type'
add_filter('woocommerce_pre_delete_$this->object_type', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...