WC_Legacy_Customer::filter_legacy_key()privateWC 3.0.0

Address and shipping_address are aliased, so we want to get the 'real' key name. For all other keys, we can just return it.

Метод класса: WC_Legacy_Customer{}

Хуков нет.

Возвращает

Строку.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->filter_legacy_key( $key );
$key(строка) (обязательный)
-

Список изменений

С версии 3.0.0 Введена.

Код WC_Legacy_Customer::filter_legacy_key() WC 8.7.0

private function filter_legacy_key( $key ) {
	if ( 'address' === $key ) {
		$key = 'address_1';
	}
	if ( 'shipping_address' === $key ) {
		$key = 'shipping_address_1';
	}

	return $key;
}