woocommerce_rest_insert_webhook_object, $webhook, $request, true

woocommerce_rest_insert_webhook_object, $webhook, $request, true

Appears in:
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.11.0.0

do_action('woocommerce_rest_insert_webhook_object, $webhook, $request, true') is found 1 times:

  • /includes/rest-api/Controllers/Version1/class-wc-rest-webhooks-v1-controller.php line 370
    		 * @param WC_Webhook      $webhook  Webhook data.
    		 * @param WP_REST_Request $request  Request object.
    		 * @param bool            $creating True when creating item, false when updating.
    		 */
    		do_action( 'woocommerce_rest_insert_webhook_object', $webhook, $request, true );
    
    		$request->set_param( 'context', 'edit' );
    		$response = $this->prepare_item_for_response( $webhook->get_id(), $request );
    		$response = rest_ensure_response( $response );
    		$response->set_status( 201 );
    		$response->header( 'Location', rest_url( sprintf( '/%s/%s/%d', $this->namespace, $this->rest_base, $webhook->get_id() ) ) );