WordPress at Your Fingertips
function is not described

WC_Checkout::get_posted_address_data() public WC 1.0

Get a posted address field after sanitization and validation.

{} It's a method of the class: WC_Checkout{}

No Hooks.

Return

String.

Usage

$WC_Checkout = new WC_Checkout();
$WC_Checkout->get_posted_address_data( $key, $type );
$key(string) (required)
Field key.
$type(string)
Type of address. Available options: 'billing' or 'shipping'.
Default: 'billing'

Code of WC_Checkout::get_posted_address_data() WC 5.9.0

public function get_posted_address_data( $key, $type = 'billing' ) {
	if ( 'billing' === $type || false === $this->legacy_posted_data['ship_to_different_address'] ) {
		$return = isset( $this->legacy_posted_data[ 'billing_' . $key ] ) ? $this->legacy_posted_data[ 'billing_' . $key ] : '';
	} else {
		$return = isset( $this->legacy_posted_data[ 'shipping_' . $key ] ) ? $this->legacy_posted_data[ 'shipping_' . $key ] : '';
	}
	return $return;
}