Overview
  • Namespace
  • Class

Namespaces

  • None
  • WC_POS
    • Admin
      • Settings
        • Receipt
    • API
    • Gateways
    • Integrations
    • Products

Classes

  • Coupons
  • Customers
  • Gateways
  • i18n
  • Orders
  • Params
  • Payload
  • Products
  • Settings
  • Support
  • Templates

Class Orders

Namespace: WC_POS\API
Located at api/orders.php

Methods summary

public
# __construct( WC_API_Server $server )

Parameters

$server
public array
# register_routes( array $routes )

Register routes for POS Orders

Register routes for POS Orders

Parameters

$routes

Returns

array
public array
# create_order_data( array $data )

Create order data

Create order data

Parameters

$data

Returns

array
public array
# edit_order_data( array $data, $order_id )

Edit order data

Edit order data

Parameters

$data
$order_id

Returns

array
public string
# product_tax_class( $tax_class, $product )

Change the product tax_class

Change the product tax_class

Parameters

$tax_class
$product

Returns

string
public mixed
# get_product_from_item( $product, $item, $WC_Product )

Set taxable

Set taxable

Parameters

$product
$item
$WC_Product

Returns

mixed
public
# order_add_product( $order_id, $item_id, $product, $qty, $args )

Opportunity to change title and add line_item meta

Opportunity to change title and add line_item meta

Parameters

$order_id
$item_id
$product
$qty
$args
public
# order_add_shipping( $order_id, $item_id, $rate )

Parameters

$order_id
$item_id
$rate
public string
# woocommerce_tax_based_on( )

Short circuit get_option('woocommerce_tax_based_on') as shop base

Short circuit get_option('woocommerce_tax_based_on') as shop base

Returns

string
public array
# find_rates( $matched_tax_rates, $args )

Remove calc_shipping_tax

Remove calc_shipping_tax

Parameters

$matched_tax_rates
$args

Returns

array
public
# updated_order_item_meta( $meta_id, $order_id, $meta_key, $meta_value )

Fix item meta for negative product/fee values

Fix item meta for negative product/fee values

Parameters

$meta_id
$order_id
$meta_key
$meta_value
public null
# update_post_metadata( $null, $order_id, $meta_key, $meta_value, $prev_value )

Apply shipping tax, fix order_tax

  • filter has already passed $this->data['shipping_tax'] test

Apply shipping tax, fix order_tax

  • filter has already passed $this->data['shipping_tax'] test

Parameters

$null
$order_id
$meta_key
$meta_value
$prev_value

Returns

null
public
# create_order( $order_id )

Create order complete

Create order complete

Parameters

$order_id
public
# edit_order( $order_id )

Edit order complete

Edit order complete

Parameters

$order_id
public
# process_payment( $order_id, $data )

Process payment

Process payment

Parameters

$order_id
$data
public mixed
# force_enable_gateway( $data )

Some gateways will check if enabled

Some gateways will check if enabled

Parameters

$data

Returns

mixed
public
# payment_complete( $order_id )

Parameters

$order_id
public array
# order_response( array $order_data, $order, $fields, $server )

Add any payment messages to API response Also add subtotal_tax to receipt which is not included for some reason

Add any payment messages to API response Also add subtotal_tax to receipt which is not included for some reason

Parameters

$order_data
$order
$fields
$server

Returns

array
public
# woocommerce_email( WC_Emails $wc_emails )

WC email notifications

WC email notifications

Parameters

$wc_emails
public static array
# email_receipt( $order_id, $email )

Send email receipt

Send email receipt

Parameters

$order_id
$email

Returns

array

Properties summary

protected string $base

$base the route base

$base the route base

# '/orders'
API documentation generated by ApiGen