Automattic\WooCommerce\Blocks\Assets
AssetDataRegistry::get_order_statuses()
Returns block-related data for enqueued wc-settings script. Format order statuses by removing a leading 'wc-' if present.
Method of the class: AssetDataRegistry{}
No Hooks.
Return
Array
. formatted statuses.
Usage
// protected - for code of main (parent) or child class $result = $this->get_order_statuses();
AssetDataRegistry::get_order_statuses() AssetDataRegistry::get order statuses code WC 9.2.3
protected function get_order_statuses() { $formatted_statuses = array(); foreach ( wc_get_order_statuses() as $key => $value ) { $formatted_key = preg_replace( '/^wc-/', '', $key ); $formatted_statuses[ $formatted_key ] = $value; } return $formatted_statuses; }