woocommerce_rest_insert_order_note

woocommerce_rest_insert_order_note

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_rest_insert_order_note') is found 2 times:

  • /includes/rest-api/Controllers/Version1/class-wc-rest-order-notes-v1-controller.php line 246
    		 * @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.
    		 */
    		do_action( 'woocommerce_rest_insert_order_note', $note, $request, true );
    
    		$request->set_param( 'context', 'edit' );
    		$response = $this->prepare_item_for_response( $note, $request );
    		$response = rest_ensure_response( $response );
    		$response->set_status( 201 );
    		$response->header( 'Location', rest_url( sprintf( '/%s/%s/%d', $this->namespace, str_replace( '(?P<order_id>[\d]+)', $order->get_id(), $this->rest_base ), $note_id ) ) );
    
  • /includes/rest-api/Controllers/Version3/class-wc-rest-order-notes-controller.php line 99
    		 * @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.
    		 */
    		do_action( 'woocommerce_rest_insert_order_note', $note, $request, true );
    
    		$request->set_param( 'context', 'edit' );
    		$response = $this->prepare_item_for_response( $note, $request );
    		$response = rest_ensure_response( $response );
    		$response->set_status( 201 );
    		$response->header( 'Location', rest_url( sprintf( '/%s/%s/%d', $this->namespace, str_replace( '(?P<order_id>[\d]+)', $order->get_id(), $this->rest_base ), $note_id ) ) );