Automattic\WooCommerce\Admin\Overrides

Order::get_customer_first_name()publicWC 1.0

Get the customer's first name.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$Order = new Order();
$Order->get_customer_first_name();

Код Order::get_customer_first_name() WC 8.7.0

public function get_customer_first_name() {
	if ( $this->get_user_id() ) {
		return get_user_meta( $this->get_user_id(), 'first_name', true );
	}

	if ( '' !== $this->get_billing_first_name( 'edit' ) ) {
		return $this->get_billing_first_name( 'edit' );
	} else {
		return $this->get_shipping_first_name( 'edit' );
	}
}