'

EXTRA {{coupon_value}} OFF

Here is your Couponcode.

{{coupon_code}}

Use this coupon to get {{coupon_value}} on your next order.

Use Now
', 'spin_message' => '

YOU HAVE WON {{spin_point}} POINT

use this point to win any lucky prizes

Prize Details : {{spin_details}}

' ); /** * @param $key - what configuration need to get * @param string $default - default value if config value not found * @return string - configuration value */ function getConfig($key, $default = '') { if (empty(self::$config)) { $this->setConfig(); } if (isset(self::$config[$key])) { return self::$config[$key]; } elseif (isset(self::$default_config[$key])) { //Check config found in default config return self::$default_config[$key]; } else { return $default; } } /** * Set rule configuration to static variable */ function setConfig() { $option = get_option(self::CONFIG); if ($option && !empty($option)) { if (is_string($option)) { $option = json_decode($option, true); } self::$config = $option; } } /** * Save the settings * @param $data * @return mixed */ function save($data) { $settings = get_option(self::CONFIG); if (empty($settings)) { return add_option(self::CONFIG, $data); } else { return update_option(self::CONFIG, $data); } } }