PHP Interface WC_Order_Data_Store_Interface

Functions that must be defined by order store classes.
Author: WooThemes
Show file Open project: woocommerce/woocommerce

Public Methods

Method Description
get_download_permissions_granted ( WC_Order $order ) : boolean Gets information about whether permissions were generated yet.
get_order_count ( string $type ) : integer Return count of orders with type.
get_order_id_by_order_key ( string $order_key ) : integer Finds an Order ID based on an order key.
get_orders ( array $args = [] ) : array Get all orders matching the passed in args.
get_recorded_coupon_usage_counts ( WC_Order $order ) : boolean Gets information about whether coupon counts were updated.
get_recorded_sales ( WC_Order $order ) : boolean Gets information about whether sales were recorded.
get_total_refunded ( $order ) : string Get amount already refunded.
get_total_shipping_refunded ( $order ) : float Get the total shipping refunded.
get_total_tax_refunded ( $order ) : float Get the total tax refunded.
get_unpaid_orders ( $date ) : array Get unpaid orders after a certain date,
search_orders ( string $term ) : array Search order data for a term and return ids.
set_download_permissions_granted ( WC_Order $order, boolean $set ) Stores information about whether permissions were generated yet.
set_recorded_coupon_usage_counts ( WC_Order $order, boolean $set ) Stores information about whether coupon counts were updated.
set_recorded_sales ( WC_Order $order, boolean $set ) Stores information about whether sales were recorded.

Method Details

get_download_permissions_granted() public method

Gets information about whether permissions were generated yet.
public get_download_permissions_granted ( WC_Order $order ) : boolean
$order WC_Order
return boolean

get_order_count() public method

Return count of orders with type.
public get_order_count ( string $type ) : integer
$type string
return integer

get_order_id_by_order_key() public method

Finds an Order ID based on an order key.
public get_order_id_by_order_key ( string $order_key ) : integer
$order_key string An order key has generated by
return integer The ID of an order, or 0 if the order could not be found

get_orders() public method

Get all orders matching the passed in args.
See also: wc_get_orders()
public get_orders ( array $args = [] ) : array
$args array
return array of orders

get_recorded_coupon_usage_counts() public method

Gets information about whether coupon counts were updated.
public get_recorded_coupon_usage_counts ( WC_Order $order ) : boolean
$order WC_Order
return boolean

get_recorded_sales() public method

Gets information about whether sales were recorded.
public get_recorded_sales ( WC_Order $order ) : boolean
$order WC_Order
return boolean

get_total_refunded() public method

Get amount already refunded.
public get_total_refunded ( $order ) : string
return string

get_total_shipping_refunded() public method

Get the total shipping refunded.
public get_total_shipping_refunded ( $order ) : float
return float

get_total_tax_refunded() public method

Get the total tax refunded.
public get_total_tax_refunded ( $order ) : float
return float

get_unpaid_orders() public method

Get unpaid orders after a certain date,
public get_unpaid_orders ( $date ) : array
return array

search_orders() public method

Search order data for a term and return ids.
public search_orders ( string $term ) : array
$term string
return array of ids

set_download_permissions_granted() public method

Stores information about whether permissions were generated yet.
public set_download_permissions_granted ( WC_Order $order, boolean $set )
$order WC_Order
$set boolean

set_recorded_coupon_usage_counts() public method

Stores information about whether coupon counts were updated.
public set_recorded_coupon_usage_counts ( WC_Order $order, boolean $set )
$order WC_Order
$set boolean

set_recorded_sales() public method

Stores information about whether sales were recorded.
public set_recorded_sales ( WC_Order $order, boolean $set )
$order WC_Order
$set boolean