Automattic\WooCommerce\Admin\Overrides

Order::get_customer_first_name()publicWC 1.0

Get the customer's first name.

Method of the class: Order{}

No Hooks.

Return

null. Nothing.

Usage

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

Order::get_customer_first_name() code WC 7.3.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' );
	}
}