bal_Entity::getInstance(); $sglobal = \DUP_PRO_Secure_Global_Entity::getInstance(); LicenseData::getInstance()->setKey(''); License::clearVersionCache(); $global->license_key_visible = License::VISIBILITY_ALL; $sglobal->lkp = ''; if ($global->save() && $sglobal->save()) { return array( 'license_success' => true, 'license_message' => __("License key cleared", 'duplicator-pro'), ); } else { return array( 'license_success' => false, 'license_message' => __("Couldn't save changes", 'duplicator-pro'), ); } } /** * Action that deactivates the license * * @return array */ public static function deactivateLicense() { $result = array( 'license_success' => true, 'license_message' => __("License Deactivated", 'duplicator-pro'), ); try { $lData = LicenseData::getInstance(); if ($lData->getStatus() !== LicenseData::STATUS_VALID) { $result = array( 'license_success' => true, 'license_message' => __('License already deactivated.', 'duplicator-pro'), ); return $result; } switch ($lData->deactivate()) { case LicenseData::ACTIVATION_RESPONSE_OK: break; case LicenseData::ACTIVATION_RESPONSE_INVALID: throw new Exception(__('Invalid license key.', 'duplicator-pro')); case LicenseData::ACTIVATION_REQUEST_ERROR: $result['license_request_error'] = $lData->getLastRequestError(); throw new Exception(self::getRequestErrorMessage()); default: throw new Exception(__('Error activating license.', 'duplicator-pro')); } } catch (Exception $e) { $result['license_success'] = false; $result['license_message'] = $e->getMessage(); } return $result; } /** * Return template file path * * @param string $path path to the template file * @param string $slugTpl slug of the template * * @return string */ public static function getTemplateFile($path, $slugTpl) { if (strpos($slugTpl, 'licensing/') === 0) { return ProBase::getAddonPath() . '/template/' . $slugTpl . '.php'; } return $path; } /** * Action that activates the license * * @return array */ public static function activateLicense() { $result = array( 'license_success' => true, 'license_message' => __("License Activated", 'duplicator-pro'), ); try { if (($licenseKey = SnapUtil::sanitizeDefaultInput(SnapUtil::INPUT_REQUEST, '_license_key')) === false) { throw new Exception(__('Please enter a valid key. Key should be 32 characters long.', 'duplicator-pro')); } if (!preg_match('/^[a-f0-9]{32}$/i', $licenseKey)) { throw new Exception(__('Please enter a valid key. Key should be 32 characters long.', 'duplicator-pro')); } $lData = LicenseData::getInstance(); // make sure reset old license key if exists self::clearLicenseKey(); $lData->setKey($licenseKey); switch ($lData->activate()) { case LicenseData::ACTIVATION_RESPONSE_OK: break; case LicenseData::ACTIVATION_RESPONSE_INVALID: throw new Exception(__('Invalid license key.', 'duplicator-pro')); case LicenseData::ACTIVATION_REQUEST_ERROR: $result['license_request_error'] = $lData->getLastRequestError(); DUP_PRO_Log::traceObject('License request error', $result['license_request_error']); throw new Exception(self::getRequestErrorMessage()); default: throw new Exception(__('Error activating license.', 'duplicator-pro')); } } catch (Exception $e) { $result['license_success'] = false; $result['license_message'] = $e->getMessage(); } return $result; } /** * Force a refresh of the license data action * * @return array */ public static function forceRefresh() { $result = array( 'license_success' => true, 'license_message' => __("License data reloaded.", 'duplicator-pro'), ); try { $lData = LicenseData::getInstance(); $lData->clearCache(); $lData->resetLastRequestFailure(); $lData->getLicenseData(); } catch (Exception $e) { $result['license_success'] = false; $result['license_message'] = $e->getMessage(); } return $result; } /** * Render page content * * @return void */ public static function renderLicenseContent() { if (!CapMng::getInstance()->can(CapMng::CAP_LICENSE, false)) { return; } self::renderLicenseMessage(); TplMng::getInstance()->render('licensing/main'); } /** * Render activation/deactivation license message * * @return void */ protected static function renderLicenseMessage() { if (!CapMng::getInstance()->can(CapMng::CAP_LICENSE, false)) { return; } $tplData = TplMng::getInstance()->getGlobalData(); if (empty($tplData['license_message'])) { return; } $success = (isset($tplData['license_success']) && $tplData['license_success'] === true); AdminNotices::displayGeneralAdminNotice( TplMng::getInstance()->render('licensing/notices/activation_message', [], false), ($success ? AdminNotices::GEN_SUCCESS_NOTICE : AdminNotices::GEN_ERROR_NOTICE), false, [], [], true ); } /** * Returns the communication error message * * @return string */ private static function getRequestErrorMessage() { $result = '' . __('License data request failed.', 'duplicator-pro') . ''; $result .= '
'; $result .= sprintf( _x( 'Please see %1$sthis FAQ entry%2$s for possible causes and resolutions.', '%1$s and %2$s represents the opening and closing HTML tags for an anchor or link', 'duplicator-pro' ), '', '' ); return $result; } }
Fatal error: Uncaught Error: Class 'Duplicator\Addons\ProBase\LicensingController' not found in /var/www/html/cineorna.com/web/wp-content/plugins/duplicator-pro/addons/probase/ProBase.php:72 Stack trace: #0 /var/www/html/cineorna.com/web/wp-content/plugins/duplicator-pro/src/Core/Addons/AddonsManager.php(59): Duplicator\Addons\ProBase\ProBase->init() #1 /var/www/html/cineorna.com/web/wp-content/plugins/duplicator-pro/src/Core/Bootstrap.php(81): Duplicator\Core\Addons\AddonsManager->inizializeAddons() #2 /var/www/html/cineorna.com/web/wp-content/plugins/duplicator-pro/duplicator-pro-main.php(32): Duplicator\Core\Bootstrap::init('7b2272223a5b225...') #3 /var/www/html/cineorna.com/web/wp-content/plugins/duplicator-pro/duplicator-pro.php(46): require_once('/var/www/html/c...') #4 /var/www/html/cineorna.com/web/wp-settings.php(526): include_once('/var/www/html/c...') #5 /var/www/html/cineorna.com/web/wp-config.php(99): require_once('/var/www/html/c...') #6 /var/www/html/cineorna.com/web/wp-load.php(50): require_once('/var/www/ in /var/www/html/cineorna.com/web/wp-content/plugins/duplicator-pro/addons/probase/ProBase.php on line 72