WC_Data::get_meta_cache_key()publicWC 4.7.0

Helper method to compute meta cache key. Different from WP Meta cache key in that meta data cached using this key also contains meta_id column.

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

Хуков нет.

Возвращает

Строку.

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

$WC_Data = new WC_Data();
$WC_Data->get_meta_cache_key();

Список изменений

С версии 4.7.0 Введена.

Код WC_Data::get_meta_cache_key() WC 8.7.0

public function get_meta_cache_key() {
	if ( ! $this->get_id() ) {
		wc_doing_it_wrong( 'get_meta_cache_key', 'ID needs to be set before fetching a cache key.', '4.7.0' );
		return false;
	}
	return self::generate_meta_cache_key( $this->get_id(), $this->cache_group );
}