WC_Legacy_Customer::__get()publicWC 1.0

__get function.

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

Хуков нет.

Возвращает

Строку.

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

$WC_Legacy_Customer = new WC_Legacy_Customer();
$WC_Legacy_Customer->__get( $key );
$key(строка) (обязательный)
-

Код WC_Legacy_Customer::__get() WC 8.7.0

public function __get( $key ) {
	wc_doing_it_wrong( $key, 'Customer properties should not be accessed directly.', '3.0' );
	$key = $this->filter_legacy_key( $key );
	if ( in_array( $key, array( 'country', 'state', 'postcode', 'city', 'address_1', 'address', 'address_2' ) ) ) {
		$key = 'billing_' . $key;
	}
	return is_callable( array( $this, "get_{$key}" ) ) ? $this->{"get_{$key}"}() : '';
}