Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Legacy_Customer::filter_legacy_key( string $key )
Address and shipping_address are aliased, so we want to get the ‘real’ key name.
Description Description
For all other keys, we can just return it.
Parameters Parameters
- $key
-
(Required)
Return Return
(string)
Source Source
File: includes/legacy/class-wc-legacy-customer.php
private function filter_legacy_key( $key ) { if ( 'address' === $key ) { $key = 'address_1'; } if ( 'shipping_address' === $key ) { $key = 'shipping_address_1'; } return $key; }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |