Method |
Description |
|
__get ( string $key ) : mixed |
Magic __get method for backwards compatibility. |
|
__isset ( string $key ) : boolean |
Magic __isset method for backwards compatibility. |
|
add_coupon ( string $code = [], integer $discount, integer $discount_tax ) : integer |
Add coupon code to the order. |
|
add_fee ( object $fee ) : integer |
Add a fee to the order. |
|
add_shipping ( $shipping_rate ) : integer |
Add a shipping row to the order. |
|
add_tax ( $tax_rate_id, integer $tax_amount, integer $shipping_tax_amount ) : integer |
Add a tax row to the order. |
|
cancel_order ( string $note = '' ) |
Cancel the order and restore the cart (before payment). |
|
decrease_coupon_usage_counts ( ) |
Decrease applied coupon counts. |
|
display_item_downloads ( array $item ) |
Display download links for an order item. |
|
display_item_meta ( array $item ) |
Display meta data belonging to an item. |
|
email_order_items_table ( array $args = [] ) : string |
Output items for display in html emails. |
|
expand_item_meta ( array $item ) : array |
Expand item meta into the $item array. |
|
get_download_url ( integer $product_id, integer $download_id ) : string |
Get the Download URL. |
|
get_item_downloads ( array $item ) : array |
Get the downloadable files for an item in this order. |
|
get_item_meta ( mixed $order_item_id, string $key = '', boolean $single = false ) : array | string |
Get order item meta. |
|
get_item_meta_array ( mixed $order_item_id ) : array |
Get all item meta data in array format in the order it was saved. Does not group meta by key like get_item_meta(). |
|
get_order ( integer $id ) : boolean |
Gets an order from the database. |
|
get_order_currency ( ) |
Get currency. |
|
get_product_from_item ( object $item ) : WC_Product | boolean |
Get a product (either product or variation). |
|
get_total_shipping ( ) : float |
Gets shipping total. Alias of WC_Order::get_shipping_total(). |
|
has_meta ( string $order_item_id ) : array |
has_meta function for order items. |
|
increase_coupon_usage_counts ( ) |
Increase applied coupon counts. |
|
legacy_set_total ( float $amount, string $total_type = 'total' ) : boolean |
Set an order total. |
|
populate ( mixed $result ) |
Populates an order from the loaded post data. |
|
record_product_sales ( ) |
Record sales. |
|
reduce_order_stock ( ) |
Reduce stock levels for all line items in the order. |
|
send_stock_notifications ( $product, $new_stock, $qty_ordered ) |
Send the stock notifications. |
|
set_address ( array $address, string $type = 'billing' ) |
Set the customer address. |
|
update_coupon ( object | integer $item, array $args ) : integer |
Update coupon for order. Note this does not update order totals. |
|
update_fee ( object | integer $item, array $args ) : integer |
Update fee for order. |
|
update_product ( object | integer $item, WC_Product $product, array $args ) : integer |
Update a line item for the order. |
|
update_shipping ( object | integer $item, array $args ) : integer |
Update shipping method for order. |
|
update_tax ( object | integer $item, array $args ) : integer |
Update tax line on order. |
|