WordPress at Your Fingertips
function is not described

WC_Data::get_meta_cache_key() public WC 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.

{} It's a method of the class: WC_Data{}

No Hooks.

Return

String.

Usage

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

Changelog

Since 4.7.0 Introduced.

Code of WC_Data::get_meta_cache_key() WC 5.8.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 );
}