Automattic\WooCommerce\Internal\Caches

ProductVersionStringInvalidator::is_using_cpt_data_storeprivateWC 1.0

Check if the product data store is CPT-based.

Method of the class: ProductVersionStringInvalidator{}

No Hooks.

Returns

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

Usage

// private - for code of main (parent) class only
$result = $this->is_using_cpt_data_store(): bool;

ProductVersionStringInvalidator::is_using_cpt_data_store() code WC 10.7.0

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