Automattic\WooCommerce\Caches

OrderCache::get_object_typepublicWC 1.0

Get the cache key and prefix to use for Orders.

Метод класса: OrderCache{}

Хуков нет.

Возвращает

Строку.

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

$OrderCache = new OrderCache();
$OrderCache->get_object_type(): string;

Код OrderCache::get_object_type() WC 9.9.5

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';
	}
}