# hurrytimer/1.2.2/includes/class-cookie-detection.php

HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress &amp; WooCommerce, version 1.2.2. 20 lines.

- Page: https://pluginprobe.com/plugins/hurrytimer/1.2.2/code/includes/class-cookie-detection.php
- Raw: https://pluginprobe.com/plugins/hurrytimer/1.2.2/raw/includes/class-cookie-detection.php
- Modified: 2019-01-21T18:52:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/hurrytimer/1.2.2/code/includes/class-cookie-detection.php#L10-L20`.

```php
<?php
namespace Hurrytimer;

class Cookie_Detection
{
    const COOKIE_PREFIX = '_ht_CDT-';

    public function find($countdown_id)
    {
        $cookie_name = self::cookie_name($countdown_id);
        return isset($_COOKIE[$cookie_name]) && !empty($_COOKIE[$cookie_name]) ? $_COOKIE[$cookie_name] : null;
    }

    public static function cookie_name($countdown_id)
    {
        return self::COOKIE_PREFIX . $countdown_id;
    }

}

```
