WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
фильтр не описан

woocommerce_rest_(post_type)_object_trashable хук-фильтр . WC 1.0

Filter whether an object is trashable.

Return false to disable trash support for the object.

Использование

add_filter( 'woocommerce_rest_(post_type)_object_trashable', 'filter_function_name_2314', 10, 2 );
function filter_function_name_2314( $supports_trash, $object ){
	// filter...

	return $supports_trash;
}
$supports_trash(true/false)
Whether the object type support trashing.
$object(WC_Data)
The object being considered for trashing support.

Где вызывается хук

WC_REST_CRUD_Controller::delete_item()
woocommerce_rest_(post_type)_object_trashable
WC_REST_Products_V2_Controller::delete_item()
woocommerce_rest_(post_type)_object_trashable
WC_REST_Product_Variations_V2_Controller::delete_item()
woocommerce_rest_(post_type)_object_trashable
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-crud-controller.php 431
$supports_trash = apply_filters( "woocommerce_rest_{$this->post_type}_object_trashable", $supports_trash, $object );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php 1381
$supports_trash = apply_filters( "woocommerce_rest_{$this->post_type}_object_trashable", $supports_trash, $object );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-product-variations-v2-controller.php 507
$supports_trash = apply_filters( "woocommerce_rest_{$this->post_type}_object_trashable", $supports_trash, $object );

Где используется хук в ядре WooCommerce

includes/rest-api/Controllers/Version2/class-wc-rest-order-refunds-v2-controller.php 53
add_filter( "woocommerce_rest_{$this->post_type}_object_trashable", '__return_false' );