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)


Top ↑

Return Return

(string)


Top ↑

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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.