Automattic\WooCommerce\StoreApi\Routes\V1
CartUpdateCustomer::get_customer_billing_address()
Get full customer billing address.
{} Это метод класса: CartUpdateCustomer{}
Хуков нет.
Возвращает
Массив
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_customer_billing_address( $customer );
- $customer(\WC_Customer) (обязательный)
- Customer object.
Код CartUpdateCustomer::get_customer_billing_address() CartUpdateCustomer::get customer billing address WC 6.8.0
protected function get_customer_billing_address( \WC_Customer $customer ) { return [ 'first_name' => $customer->get_billing_first_name(), 'last_name' => $customer->get_billing_last_name(), 'company' => $customer->get_billing_company(), 'address_1' => $customer->get_billing_address_1(), 'address_2' => $customer->get_billing_address_2(), 'city' => $customer->get_billing_city(), 'state' => $customer->get_billing_state(), 'postcode' => $customer->get_billing_postcode(), 'country' => $customer->get_billing_country(), 'phone' => $customer->get_billing_phone(), ]; }