WC_Customer::get_billing()publicWC 3.2.0

Get billing.

Метод класса: WC_Customer{}

Хуки из метода

Возвращает

Массив.

Использование

$WC_Customer = new WC_Customer();
$WC_Customer->get_billing( $context );
$context(строка)
What the value is for. Valid values are 'view' and 'edit'.
По умолчанию: 'view'

Список изменений

С версии 3.2.0 Введена.

Код WC_Customer::get_billing() WC 8.7.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;
}