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.8.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
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    * @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
    095
    096
    097
    098
    099
    100
    101
    102
    103
    104
    105
    * @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 ) ) );