WC_Legacy_Customer::filter_legacy_key
Address and shipping_address are aliased, so we want to get the 'real' key name. For all other keys, we can just return it.
Method of the class: WC_Legacy_Customer{}
No Hooks.
Returns
String.
Usage
// private - for code of main (parent) class only $result = $this->filter_legacy_key( $key );
- $key(string) (required)
- .
Changelog
| Since 3.0.0 | Introduced. |
WC_Legacy_Customer::filter_legacy_key() WC Legacy Customer::filter legacy key code WC 10.3.6
private function filter_legacy_key( $key ) {
if ( 'address' === $key ) {
$key = 'address_1';
}
if ( 'shipping_address' === $key ) {
$key = 'shipping_address_1';
}
return $key;
}