woocommerce_rest_product_review_trashable

FILTER woocommerce\includes\rest-api\Controllers\Version3\class-wc-rest-product-reviews-controller.php (ligne 638) github
Filters whether a review can be trashed. Return false to disable trash support for the post.

Paramètres

Entrée :
( EMPTY_TRASH_DAYS > 0
Sortie :
@param bool       $supports_trash Whether the post type support trashing.
@param WP_Comment $review         The review object being considered for trashing support.

Utilisation

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

function ma_fonction_filtre(( EMPTY_TRASH_DAYS > 0) {
    // Modifier la valeur
    return ( EMPTY_TRASH_DAYS > 0;
}

Actualités

Chargement des actualités...