Automattic\WooCommerce\Caches
OrderCache::get_object_type
Get the cache key and prefix to use for Orders.
Method of the class: OrderCache{}
No Hooks.
Returns
String.
Usage
$OrderCache = new OrderCache(); $OrderCache->get_object_type(): string;
OrderCache::get_object_type() OrderCache::get object type code WC 10.7.0
public function get_object_type(): string {
if ( 'yes' === get_option( CustomOrdersTableController::HPOS_DATASTORE_CACHING_ENABLED_OPTION ) ) {
/**
* The use of datastore caching moves persistent data caching to the datastore. Order object caching then only
* acts as request level caching as the `order_objects` cache group is set as non-persistent.
*/
return 'order_objects';
} else {
return 'orders';
}
}