woocommerce_api_create_order_data

woocommerce_api_create_order_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_data') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-orders.php line 375
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    if ( ! current_user_can( 'publish_shop_orders' ) ) {
        throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_order', __( 'You do not have permission to create orders', 'woocommerce' ), 401 );
    }
     
    $data = apply_filters( 'woocommerce_api_create_order_data', $data, $this );
     
    // default order args, note that status is checked for validity in wc_create_order()
    $default_order_args = array(
        'status'        => isset( $data['status'] ) ? $data['status'] : '',
        'customer_note' => isset( $data['note'] ) ? $data['note'] : null,
    );
  • /includes/legacy/api/v3/class-wc-api-orders.php line 410
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    if ( ! current_user_can( 'publish_shop_orders' ) ) {
        throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_order', __( 'You do not have permission to create orders', 'woocommerce' ), 401 );
    }
     
    $data = apply_filters( 'woocommerce_api_create_order_data', $data, $this );
     
    // default order args, note that status is checked for validity in wc_create_order()
    $default_order_args = array(
        'status'        => isset( $data['status'] ) ? $data['status'] : '',
        'customer_note' => isset( $data['note'] ) ? $data['note'] : null,
    );