Example #1
0
/**
 * Add EDD SL support
 *
 * @since 0.2.0
 *
 * @uses "admin_init"
 */
function ingot_sl_plugin_updater()
{
    $license_key = ingot_sl_get_license();
    $edd_updater = new EDD_SL_Plugin_Updater(INGOT_SL_STORE_URL, __FILE__, array('version' => INGOT_VER, 'license' => $license_key, 'item_name' => INGOT_SL_ITEM_NAME, 'author' => 'Ingot LLC'));
}
Example #2
0
 /**
  * Handle license update
  *
  * @since 0.2.0
  *
  * @param $value License code
  *
  * @return bool|\WP_Error
  */
 protected static function handle_license($value)
 {
     $current = ingot_sl_get_license();
     if ($value == $current) {
         return true;
     } else {
         $activated = ingot_sl_activate_license($value);
         if ('valid' == $activated) {
             return true;
         } else {
             return false;
         }
     }
 }