wc_is_order_status() │ WC 1.0

See if a string is an order status.

Хуков нет.

Возвращает

bool.

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

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

Код wc_is_order_status() WC 11.2.2

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