woocommerce_rest_insert_order_note
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
woocommerce_rest_insert_order_note
woocommerce_rest_insert_order_note
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-order-notes-controller.php 99
do_action( 'woocommerce_rest_insert_order_note', $note, $request, true );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-order-notes-v1-controller.php 247
do_action( 'woocommerce_rest_insert_order_note', $note, $request, true );