Filter whether an object is trashable. Return false to disable trash support for the object.
$supports_trash, $object
Sortie :
@param boolean $supports_trash Whether the object type support trashing. @param WC_Data $object The object being considered for trashing support.
// Modifier la valeur avec le filtre 'woocommerce_rest_{$this->post_type}_object_trashable'
add_filter('woocommerce_rest_{$this->post_type}_object_trashable', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($supports_trash) {
// Modifier la valeur
return $supports_trash;
}
Chargement des actualités...