Automattic\WooCommerce\Caches
OrderCountCacheService::get_prefixed_status
Get the prefixed status.
Method of the class: OrderCountCacheService{}
No Hooks.
Returns
String.
Usage
// private - for code of main (parent) class only $result = $this->get_prefixed_status( $status );
- $status(string) (required)
- The status.
OrderCountCacheService::get_prefixed_status() OrderCountCacheService::get prefixed status code WC 10.7.0
private function get_prefixed_status( $status ) {
$status = 'wc-' . $status;
$special_statuses = array(
'wc-' . OrderStatus::AUTO_DRAFT => OrderStatus::AUTO_DRAFT,
'wc-' . OrderStatus::TRASH => OrderStatus::TRASH,
);
if ( isset( $special_statuses[ $status ] ) ) {
return $special_statuses[ $status ];
}
return $status;
}