Automattic\WooCommerce\Vendor\Detection

MobileDetect::getUserAgent()publicWC 1.0

Retrieve the User-Agent.

Method of the class: MobileDetect{}

No Hooks.

Return

String|null. The user agent if it's set.

Usage

$MobileDetect = new MobileDetect();
$MobileDetect->getUserAgent(): ?string;

MobileDetect::getUserAgent() code WC 9.4.2

public function getUserAgent(): ?string
{
    return $this->userAgent;
}