Automattic\WooCommerce\Vendor\Detection

MobileDetect::getRules()publicWC 1.0

Method gets the mobile detection rules. This method is used for the magic methods $detect->is*(). Retrieve the current set of rules.

Method of the class: MobileDetect{}

No Hooks.

Return

Array.

Usage

$MobileDetect = new MobileDetect();
$MobileDetect->getRules(): array;

MobileDetect::getRules() code WC 9.4.2

public function getRules(): array
{
    static $rules;

    if (!$rules) {
        $rules = array_merge(
            static::$phoneDevices,
            static::$tabletDevices,
            static::$operatingSystems,
            static::$browsers
        );
    }

    return $rules;
}