File "class-wc-helper-options.php"

Full path: /home/kosmetik/public_html/wp-content/plugins/woocommerce/includes/admin/helper/class-wc-helper-options.php
File size: 598 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

<?php

if (!defined('ABSPATH')) {
    exit;
}
class WC_Helper_Options
{
    private static $option_name = 'woocommerce_helper_data';
    public static function update($key, $value)
    {
        $options = get_option(self::$option_name, array());
        $options[$key] = $value;
        return update_option(self::$option_name, $options, true);
    }
    public static function get($key, $default = false)
    {
        $options = get_option(self::$option_name, array());
        if (array_key_exists($key, $options)) {
            return $options[$key];
        }
        return $default;
    }
}