wc_is_order_status()WC 1.0

See if a string is an order status.

No Hooks.

Return

true|false.

Usage

wc_is_order_status( $maybe_status );
$maybe_status(string) (required)
Status, including any wc- prefix.

wc_is_order_status() code WC 9.4.2

function wc_is_order_status( $maybe_status ) {
	$order_statuses = wc_get_order_statuses();
	return isset( $order_statuses[ $maybe_status ] );
}