wc_is_order_status()WC 1.0

See if a string is an order status.

Хуков нет.

Возвращает

true|false.

Использование

wc_is_order_status( $maybe_status );
$maybe_status(строка) (обязательный)
Status, including any wc- prefix.

Код wc_is_order_status() WC 6.4.1

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