rest_product_review_trashable

rest_product_review_trashable

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('rest_product_review_trashable') is found 1 times:

  • /includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller.php line 400
    		 *
    		 * @param boolean $supports_trash        Whether the object supports trashing.
    		 * @param WP_Post $product_review        The object being considered for trashing support.
    		 */
    		$supports_trash = apply_filters( 'rest_product_review_trashable', ( EMPTY_TRASH_DAYS > 0 ), $product_review );
    
    		$request->set_param( 'context', 'edit' );
    		$response = $this->prepare_item_for_response( $product_review, $request );
    
    		if ( $force ) {
    			$result = wp_delete_comment( $product_review_id, true );