WC_Data::get_meta_cache_key
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.
Method of the class: WC_Data{}
No Hooks.
Returns
String.
Usage
$WC_Data = new WC_Data(); $WC_Data->get_meta_cache_key();
Changelog
| Since 4.7.0 | Introduced. |
WC_Data::get_meta_cache_key() WC Data::get meta cache key code WC 10.8.1
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 );
}