WordPress at a glance
filter is not described

woocommerce_rest_pre_insert_(post_type)_object filter-hook . 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.

Usage

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

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

Where the hook is called

WC_REST_Orders_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
WC_REST_Products_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_Product_Variations_V2_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_Order_Refunds_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
WC_REST_Coupons_V2_Controller::prepare_object_for_database()
woocommerce_rest_pre_insert_(post_type)_object
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php 163
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $order, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php 727
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $product, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php 317
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 88
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-products-v2-controller.php 1262
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $product, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-order-refunds-v2-controller.php 323
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $refund, $request, $creating );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php 607
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $order, $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 );

Where in WP core the hook is used WooCommerce

Usage not found.