woocommerce_rest_insert_order_note action-hookWC 1.0

Fires after a order note is created or updated via the REST API.

Usage

add_action( 'woocommerce_rest_insert_order_note', 'wp_kama_woocommerce_rest_insert_order_note_action', 10, 3 );

/**
 * Function for `woocommerce_rest_insert_order_note` action-hook.
 * 
 * @param WP_Comment      $note     New order note object.
 * @param WP_REST_Request $request  Request object.
 * @param boolean         $creating True when creating item, false when updating.
 *
 * @return void
 */
function wp_kama_woocommerce_rest_insert_order_note_action( $note, $request, $creating ){

	// action...
}
$note(WP_Comment)
New order note object.
$request(WP_REST_Request)
Request object.
$creating(true|false)
True when creating item, false when updating.

Where the hook is called

WC_REST_Order_Notes_V1_Controller::create_item()
woocommerce_rest_insert_order_note
WC_REST_Order_Notes_Controller::create_item()
woocommerce_rest_insert_order_note
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-order-notes-v1-controller.php 246
do_action( 'woocommerce_rest_insert_order_note', $note, $request, true );
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-order-notes-controller.php 99
do_action( 'woocommerce_rest_insert_order_note', $note, $request, true );

Where the hook is used in WooCommerce

Usage not found.