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

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

Filter the query_vars used in get_items for the constructed query.

The dynamic portion of the hook name, $this->post_type, refers to post_type of the post being prepared for insertion.

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

add_filter( 'woocommerce_rest_pre_insert_(post_type)', 'filter_function_name_7405', 10, 2 );
function filter_function_name_7405( $coupon, $request ){
	// filter...

	return $coupon;
}
$coupon(WC_Coupon)
The coupon object.
$request(WP_REST_Request)
Request object.

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

WC_REST_Legacy_Coupons_Controller::prepare_item_for_database()
woocommerce_rest_pre_insert_(post_type)
WC_REST_Legacy_Orders_Controller::prepare_item_for_database()
woocommerce_rest_pre_insert_(post_type)
WC_REST_Coupons_V1_Controller::prepare_item_for_database()
woocommerce_rest_pre_insert_(post_type)
WC_REST_Orders_V1_Controller::prepare_item_for_database()
woocommerce_rest_pre_insert_(post_type)
WC_REST_Products_V1_Controller::prepare_item_for_database()
woocommerce_rest_pre_insert_(post_type)
WC_REST_Webhooks_V1_Controller::prepare_item_for_database()
woocommerce_rest_pre_insert_(post_type)
woocommerce/includes/legacy/api/class-wc-rest-legacy-coupons-controller.php 162
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $coupon, $request );
woocommerce/includes/legacy/api/class-wc-rest-legacy-orders-controller.php 222
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $order, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-coupons-v1-controller.php 298
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $coupon, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-orders-v1-controller.php 502
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $order, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-products-v1-controller.php 728
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $product, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-webhooks-v1-controller.php 535
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $data, $request );

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

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