WC_Order_Data_Store_Interface
in
WC Order Data Store Interface
Functions that must be defined by order store classes.
Tags
Table of Contents
- get_download_permissions_granted() : bool
- Gets information about whether permissions were generated yet.
- get_order_count() : int
- Return count of orders with a specific status.
- get_order_id_by_order_key() : int
- Finds an Order ID based on an order key.
- get_order_type() : string
- Get the order type based on Order ID.
- get_orders() : array<string|int, mixed>
- Get all orders matching the passed in args.
- get_recorded_coupon_usage_counts() : bool
- Gets information about whether coupon counts were updated.
- get_recorded_sales() : bool
- Gets information about whether sales were recorded.
- get_total_refunded() : float
- Get amount already refunded.
- get_total_shipping_refunded() : float
- Get the total shipping refunded.
- get_total_tax_refunded() : float
- Get the total tax refunded.
- get_unpaid_orders() : array<string|int, mixed>
- Get unpaid orders after a certain date,
- search_orders() : array<string|int, mixed>
- Search order data for a term and return ids.
- set_download_permissions_granted() : mixed
- Stores information about whether permissions were generated yet.
- set_recorded_coupon_usage_counts() : mixed
- Stores information about whether coupon counts were updated.
- set_recorded_sales() : mixed
- Stores information about whether sales were recorded.
Methods
get_download_permissions_granted()
Gets information about whether permissions were generated yet.
public
get_download_permissions_granted(WC_Order $order) : bool
Parameters
- $order : WC_Order
-
Order object.
Return values
bool —get_order_count()
Return count of orders with a specific status.
public
get_order_count(string $status) : int
Parameters
- $status : string
-
Order status.
Return values
int —get_order_id_by_order_key()
Finds an Order ID based on an order key.
public
get_order_id_by_order_key(string $order_key) : int
Parameters
- $order_key : string
-
An order key has generated by.
Return values
int — The ID of an order, or 0 if the order could not be found.get_order_type()
Get the order type based on Order ID.
public
get_order_type(int $order_id) : string
Parameters
- $order_id : int
-
Order ID.
Return values
string —get_orders()
Get all orders matching the passed in args.
public
get_orders([array<string|int, mixed> $args = array() ]) : array<string|int, mixed>
Parameters
- $args : array<string|int, mixed> = array()
-
Arguments.
Tags
Return values
array<string|int, mixed> — of ordersget_recorded_coupon_usage_counts()
Gets information about whether coupon counts were updated.
public
get_recorded_coupon_usage_counts(WC_Order $order) : bool
Parameters
- $order : WC_Order
-
Order object.
Return values
bool —get_recorded_sales()
Gets information about whether sales were recorded.
public
get_recorded_sales(WC_Order $order) : bool
Parameters
- $order : WC_Order
-
Order object.
Return values
bool —get_total_refunded()
Get amount already refunded.
public
get_total_refunded(WC_Order $order) : float
Parameters
- $order : WC_Order
-
Order object.
Return values
float —get_total_shipping_refunded()
Get the total shipping refunded.
public
get_total_shipping_refunded(WC_Order $order) : float
Parameters
- $order : WC_Order
-
Order object.
Return values
float —get_total_tax_refunded()
Get the total tax refunded.
public
get_total_tax_refunded(WC_Order $order) : float
Parameters
- $order : WC_Order
-
Order object.
Return values
float —get_unpaid_orders()
Get unpaid orders after a certain date,
public
get_unpaid_orders(int $date) : array<string|int, mixed>
Parameters
- $date : int
-
timestamp.
Return values
array<string|int, mixed> —search_orders()
Search order data for a term and return ids.
public
search_orders(string $term) : array<string|int, mixed>
Parameters
- $term : string
-
Term name.
Return values
array<string|int, mixed> — of idsset_download_permissions_granted()
Stores information about whether permissions were generated yet.
public
set_download_permissions_granted(WC_Order $order, bool $set) : mixed
Parameters
- $order : WC_Order
-
Order object.
- $set : bool
-
If should set.
Return values
mixed —set_recorded_coupon_usage_counts()
Stores information about whether coupon counts were updated.
public
set_recorded_coupon_usage_counts(WC_Order $order, bool $set) : mixed
Parameters
- $order : WC_Order
-
Order object.
- $set : bool
-
If should set.
Return values
mixed —set_recorded_sales()
Stores information about whether sales were recorded.
public
set_recorded_sales(WC_Order $order, bool $set) : mixed
Parameters
- $order : WC_Order
-
Order object.
- $set : bool
-
If should set.