Automattic\WooCommerce\Internal\Caches

ProductVersionStringInvalidator::is_using_cpt_data_storeprivateWC 1.0

Check if the product data store is CPT-based.

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

Хуков нет.

Возвращает

true|false. True if using CPT data store, false otherwise.

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

// private - только в коде основоного (родительского) класса
$result = $this->is_using_cpt_data_store(): bool;

Код ProductVersionStringInvalidator::is_using_cpt_data_store() WC 10.5.2

private function is_using_cpt_data_store(): bool {
	$data_store = \WC_Data_Store::load( 'product' );
	return $data_store->get_current_class_name() === 'WC_Product_Data_Store_CPT';
}