woocommerce_rest_insert_webhook_object action-hookWC 1.0

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

Usage

add_action( 'woocommerce_rest_insert_webhook_object', 'wp_kama_woocommerce_rest_insert_webhook_object_action', 10, 3 );

/**
 * Function for `woocommerce_rest_insert_webhook_object` action-hook.
 * 
 * @param WC_Webhook      $webhook  Webhook data.
 * @param WP_REST_Request $request  Request object.
 * @param bool            $creating True when creating item, false when updating.
 *
 * @return void
 */
function wp_kama_woocommerce_rest_insert_webhook_object_action( $webhook, $request, $creating ){

	// action...
}
$webhook(WC_Webhook)
Webhook data.
$request(WP_REST_Request)
Request object.
$creating(true|false)
True when creating item, false when updating.

Where the hook is called

WC_REST_Webhooks_V1_Controller::create_item()
woocommerce_rest_insert_webhook_object
WC_REST_Webhooks_V1_Controller::update_item()
woocommerce_rest_insert_webhook_object
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-webhooks-v1-controller.php 370
do_action( 'woocommerce_rest_insert_webhook_object', $webhook, $request, true );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-webhooks-v1-controller.php 450
do_action( 'woocommerce_rest_insert_webhook_object', $webhook, $request, false );

Where the hook is used in WooCommerce

Usage not found.