WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin

DataSourcePoller::get_spec_key() protected WC 1.0

Returns the key identifier of spec, this can easily be overwritten. Defaults to id.

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

No Hooks.

Return

String|true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_spec_key( $spec );
$spec(mixed) (required)
a JSON parsed spec coming from the JSON feed.

Code of DataSourcePoller::get_spec_key() WC 6.1.0

protected function get_spec_key( $spec ) {
	$key = $this->args['spec_key'];
	if ( isset( $spec->$key ) ) {
		return $spec->$key;
	}
	return false;
}