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

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

Filters an object before it is inserted via the REST API.

The dynamic portion of the hook name, $this->post_type, refers to the object type slug.

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

add_filter( 'woocommerce_rest_pre_insert_(post_type)_object', 'filter_function_name_9629', 10, 3 );
function filter_function_name_9629( $product, $request, $creating ){
	// filter...

	return $product;
}
$product(WC_Data)
Object object.
$request(WP_REST_Request)
Request object.
$creating(true/false)
If is creating a new object.

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

WC_REST_Products_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
WC_REST_Orders_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
WC_REST_Product_Variations_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
WC_REST_Order_Refunds_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
WC_REST_Products_V2_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
WC_REST_Coupons_V2_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
WC_REST_Order_Refunds_V2_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
WC_REST_Product_Variations_V2_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
WC_REST_Orders_V2_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php 684
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $product, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php 134
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $order, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php 307
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $variation, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-order-refunds-controller.php 84
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $refund, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php 1086
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $product, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-coupons-v2-controller.php 320
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $coupon, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-order-refunds-v2-controller.php 316
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $refund, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-product-variations-v2-controller.php 464
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $variation, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php 554
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $order, $request, $creating );

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

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