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

woocommerce_rest_insert_(post_type) хук-событие . WC 1.0

Fires after a single item is created or updated via the REST API.

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

add_action( 'woocommerce_rest_insert_(post_type)', 'action_function_name_8381', 10, 3 );
function action_function_name_8381( $post, $request, $creating ){
	// action...
}
$post(WP_Post)
Post object.
$request(WP_REST_Request)
Request object.
$creating(true/false)
True when creating item, false when updating.

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

WC_REST_Posts_Controller::create_item()
woocommerce_rest_insert_(post_type)
WC_REST_Posts_Controller::update_item()
woocommerce_rest_insert_(post_type)
WC_REST_Coupons_V1_Controller::create_item()
woocommerce_rest_insert_(post_type)
WC_REST_Coupons_V1_Controller::update_item()
woocommerce_rest_insert_(post_type)
WC_REST_Orders_V1_Controller::create_item()
woocommerce_rest_insert_(post_type)
WC_REST_Orders_V1_Controller::update_item()
woocommerce_rest_insert_(post_type)
WC_REST_Order_Refunds_V1_Controller::create_item()
woocommerce_rest_insert_(post_type)
woocommerce/packages/woocommerce-rest-api/src/Controllers/Version3/class-wc-rest-posts-controller.php 216
do_action( "woocommerce_rest_insert_{$this->post_type}", $post, $request, true );
woocommerce/packages/woocommerce-rest-api/src/Controllers/Version3/class-wc-rest-posts-controller.php 294
do_action( "woocommerce_rest_insert_{$this->post_type}", $post, $request, false );
woocommerce/packages/woocommerce-rest-api/src/Controllers/Version1/class-wc-rest-coupons-v1-controller.php 330
do_action( "woocommerce_rest_insert_{$this->post_type}", $post, $request, true );
woocommerce/packages/woocommerce-rest-api/src/Controllers/Version1/class-wc-rest-coupons-v1-controller.php 369
do_action( "woocommerce_rest_insert_{$this->post_type}", $post, $request, false );
woocommerce/packages/woocommerce-rest-api/src/Controllers/Version1/class-wc-rest-orders-v1-controller.php 844
do_action( "woocommerce_rest_insert_{$this->post_type}", $post, $request, true );
woocommerce/packages/woocommerce-rest-api/src/Controllers/Version1/class-wc-rest-orders-v1-controller.php 883
do_action( "woocommerce_rest_insert_{$this->post_type}", $post, $request, false );
woocommerce/packages/woocommerce-rest-api/src/Controllers/Version1/class-wc-rest-order-refunds-v1-controller.php 321
do_action( "woocommerce_rest_insert_{$this->post_type}", $post, $request, true );

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

packages/woocommerce-rest-api/src/Controllers/Version1/class-wc-rest-products-v1-controller.php 51
add_action( "woocommerce_rest_insert_{$this->post_type}", array( $this, 'clear_transients' ) );
packages/woocommerce-rest-api/src/Controllers/Version2/class-wc-rest-products-v2-controller.php 53
add_action( "woocommerce_rest_insert_{$this->post_type}_object", array( $this, 'clear_transients' ) );