WooCommerce Code Reference

WC_Order_Data_Store_Interface

WC Order Data Store Interface

Functions that must be defined by order store classes.

Tags
version
3.0.0

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_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
intThe ID of an order, or 0 if the order could not be found.