woocommerce_api_create_order_note_data

woocommerce_api_create_order_note_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_create_order_note_data') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-orders.php line 1303
    1299
    1300
    1301
    1302
    1303
    1304
    1305
    1306
    1307
    1308
    }
     
    $order = wc_get_order( $order_id );
     
    $data = apply_filters( 'woocommerce_api_create_order_note_data', $data, $order_id, $this );
     
    // note content is required
    if ( ! isset( $data['note'] ) ) {
        throw new WC_API_Exception( 'woocommerce_api_invalid_order_note', __( 'Order note is required', 'woocommerce' ), 400 );
    }
  • /includes/legacy/api/v3/class-wc-api-orders.php line 1348
    1344
    1345
    1346
    1347
    1348
    1349
    1350
    1351
    1352
    1353
    }
     
    $order = wc_get_order( $order_id );
     
    $data = apply_filters( 'woocommerce_api_create_order_note_data', $data, $order_id, $this );
     
    // note content is required
    if ( ! isset( $data['note'] ) ) {
        throw new WC_API_Exception( 'woocommerce_api_invalid_order_note', __( 'Order note is required', 'woocommerce' ), 400 );
    }