WC_Legacy_Customer::__get( string $key )
__get function.
Description Description
Parameters Parameters
- $key
-
(Required)
Return Return
(string)
Source Source
File: includes/legacy/class-wc-legacy-customer.php
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}"}() : ''; }