woocommerce_rest_product_review_trashable

woocommerce_rest_product_review_trashable

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_rest_product_review_trashable') is found 1 times:

  • /includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php line 638
    		 * @since 3.5.0
    		 * @param bool       $supports_trash Whether the post type support trashing.
    		 * @param WP_Comment $review         The review object being considered for trashing support.
    		 */
    		$supports_trash = apply_filters( 'woocommerce_rest_product_review_trashable', ( EMPTY_TRASH_DAYS > 0 ), $review );
    
    		$request->set_param( 'context', 'edit' );
    
    		if ( $force ) {
    			$previous = $this->prepare_item_for_response( $review, $request );
    			$result   = wp_delete_comment( $review->comment_ID, true );