WordPress at Your Fingertips
function is not described

WC_Data_Store_WP::prefix_key() protected WC 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.

{} It's a 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.

Code of WC_Data_Store_WP::prefix_key() WC 5.8.0

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