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
    			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
    			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,
    			);