WC_Countries::read_geo_property
Read the countries or states property from inside the class.
Uses a real property when the object has one, as a plain read would. Otherwise calls __get() directly, because PHP returns null for a magic property that is already being read further up the stack (a locale filter can do that).
Method of the class: WC_Countries{}
No Hooks.
Returns
mixed.
Usage
// private - for code of main (parent) class only $result = $this->read_geo_property( $key );
- $key(string) (required)
- Property name.
WC_Countries::read_geo_property() WC Countries::read geo property code WC 11.2.1
private function read_geo_property( $key ) {
return array_key_exists( $key, get_object_vars( $this ) ) ? $this->{$key} : $this->__get( $key );
}