WC_Legacy_Customer::__get()
__get function.
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)
- -
WC_Legacy_Customer::__get() WC Legacy Customer:: get code WC 7.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}"}() : ''; }