WC_Legacy_Customer::__get() public WC 1.0
__get function.
{} It's a method of the class: WC_Legacy_Customer{}
No Hooks.
Return
String.
Usage
$WC_Legacy_Customer = new WC_Legacy_Customer(); $WC_Legacy_Customer->__get( $key );
- $key(string) (required)
- -
Code of WC_Legacy_Customer::__get() WC Legacy Customer:: get WC 5.0.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}"}() : '';
}