Automattic\WooCommerce\Admin
DataSourcePoller::get_spec_key()
Returns the key identifier of spec, this can easily be overwritten. Defaults to id.
Метод класса: DataSourcePoller{}
Хуков нет.
Возвращает
Строку|true|false
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_spec_key( $spec );
- $spec(разное) (обязательный)
- a JSON parsed spec coming from the JSON feed.
Код DataSourcePoller::get_spec_key() DataSourcePoller::get spec key WC 7.3.0
protected function get_spec_key( $spec ) { $key = $this->args['spec_key']; if ( isset( $spec->$key ) ) { return $spec->$key; } return false; }