WC_Data_Store_WP::prefix_key()protectedWC 2.6.0

Internal meta keys we don't want exposed as part of meta_data. This is in addition to all data props with _ prefix.

Method of the class: WC_Data_Store_WP{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->prefix_key( $key );
$key(string) (required)
Prefix to be added to meta keys.

Changelog

Since 2.6.0 Introduced.

WC_Data_Store_WP::prefix_key() code WC 9.4.2

protected function prefix_key( $key ) {
	return '_' === substr( $key, 0, 1 ) ? $key : '_' . $key;
}