WooCommerce Code Reference

OrderInternalStatus
in package

Enum class for all the internal order statuses.

These statuses are used internally by WooCommerce to query database directly.

Table of Contents

CANCELLED  = 'wc-cancelled'
The order is cancelled.
COMPLETED  = 'wc-completed'
The order is completed.
FAILED  = 'wc-failed'
The order is failed.
ON_HOLD  = 'wc-on-hold'
The order is on hold.
PENDING  = 'wc-pending'
The order is pending payment.
PROCESSING  = 'wc-processing'
The order is processing.
REFUNDED  = 'wc-refunded'
The order is refunded.
get_all()  : array<string|int, string>
Returns every internal order status value defined by this enum, as a flat list of `wc-` prefixed slugs.

Constants

Methods

get_all()

Returns every internal order status value defined by this enum, as a flat list of `wc-` prefixed slugs.

public static get_all() : array<string|int, string>

These are the seven core statuses, which is narrower than the set an order can hold. The enum has no wc-checkout-draft, a status WooCommerce registers through the wc_order_statuses filter and the Store API assigns to live orders during checkout. It cannot carry statuses an extension registers either.

For the registered statuses, use wc_get_order_statuses(), which returns a value => label map on these same prefixed keys. OrderStatus lists a wider set of unprefixed slugs, including WordPress post statuses such as trash and auto-draft.

Tags
since
10.9.0
Return values
array<string|int, string> —