WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin

Loader::get_unregistered_order_statuses() public WC 1.0

Get all order statuses present in analytics tables that aren't registered.

{} It's a method of the class: Loader{}

No Hooks.

Return

Array. Unregistered order statuses.

Usage

$result = Loader::get_unregistered_order_statuses();

Code of Loader::get_unregistered_order_statuses() WC 5.8.0

public static function get_unregistered_order_statuses() {
	$registered_statuses   = wc_get_order_statuses();
	$all_synced_statuses   = OrdersDataStore::get_all_statuses();
	$unregistered_statuses = array_diff( $all_synced_statuses, array_keys( $registered_statuses ) );
	$formatted_status_keys = self::get_order_statuses( array_fill_keys( $unregistered_statuses, '' ) );
	$formatted_statuses    = array_keys( $formatted_status_keys );

	return array_combine( $formatted_statuses, $formatted_statuses );
}