# fluent-cart/1.6.4/app/Modules/StorageDrivers/Local/LocalSettings.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.4. 46 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/app/Modules/StorageDrivers/Local/LocalSettings.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/app/Modules/StorageDrivers/Local/LocalSettings.php
- Modified: 2025-10-14T16:36:46+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/fluent-cart/1.6.4/code/app/Modules/StorageDrivers/Local/LocalSettings.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Modules\StorageDrivers\Local;

use FluentCart\Framework\Support\Arr;

class LocalSettings
{

    protected $settings;

    protected $driverHandler = 'fluent_cart_storage_settings_local';

    static ?array $cachedSettings = null;

    public function __construct()
    {
        if (self::$cachedSettings) {
            $this->settings = self::$cachedSettings;
            return;
        }

        $settings = fluent_cart_get_option($this->driverHandler, []);
        $this->settings = wp_parse_args($settings, static::getDefaults());
        self::$cachedSettings = $this->settings;
    }

    public static function getDefaults()
    {
        return [
            'is_active'    => 'yes',
        ];
    }

    public function isActive()
    {
        $settings = $this->get();

        return Arr::get($settings, 'is_active') === 'yes';
    }

    public function get($key = '')
    {
        return $this->settings;
    }
}
```
