WordPress at Your Fingertips
function is not described

WC_Customer::get_billing() public WC 3.2.0

Get billing.

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

Hooks from the method

Return

Array.

Usage

$WC_Customer = new WC_Customer();
$WC_Customer->get_billing( $context );
$context(string)
What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'

Changelog

Since 3.2.0 Introduced.

Code of WC_Customer::get_billing() WC 5.9.0

public function get_billing( $context = 'view' ) {
	$value = null;
	$prop  = 'billing';

	if ( array_key_exists( $prop, $this->data ) ) {
		$changes = array_key_exists( $prop, $this->changes ) ? $this->changes[ $prop ] : array();
		$value   = array_merge( $this->data[ $prop ], $changes );

		if ( 'view' === $context ) {
			$value = apply_filters( $this->get_hook_prefix() . $prop, $value, $this );
		}
	}

	return $value;
}