Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- class WhmcsConnectRegist
- {
- public function __construct()
- {
- $val = (object) unserialize(get_option('WhcmsConnectSettings'));
- if ($val->appendjs == 'header') {
- add_action('wp_enqueue_scripts', [$this, 'whcmsConnectJS']);
- }
- else {
- add_action('wp_footer', [$this, 'FooterwhcmsConnectJS']);
- }
- add_action('admin_enqueue_scripts', [$this, 'whcmsConnectAdminScript']);
- add_action('admin_menu', [$this, 'whConnectSettingsPage']);
- add_action('WhcmsConnectCron', [$this, 'whcmsConnectProcced']);
- add_action('admin_init', [$this, 'whcmsConnectUpdater']);
- }
- static public function whcmaConnectActionLinks($links)
- {
- $links[] = '<a href="' . admin_url('admin.php?page=') . WhmcsConnectSlug . '">' . __('Settings') . '</a>';
- $links[] = '<a href="' . admin_url('admin.php?page=' . WhmcsConnectLicenseSlug) . '">' . __('license') . '</a>';
- return $links;
- }
- static public function WhcmsConnectCron()
- {
- if (!wp_next_scheduled(__FUNCTION__)) {
- wp_schedule_event(time(), 'daily', __FUNCTION__);
- }
- }
- static public function DeleteWhcmsConnectCron()
- {
- wp_clear_scheduled_hook('WhcmsConnectCron');
- }
- static public function whcmsConnectUpdater()
- {
- require_once WhmcsConnectPath . '/Inc/WhcmConUpdate.php';
- $updater = new Alledia\whcmsConnectUpdater(whcmsApiLink, WhcmsActivePage, ['version' => WhmcsConnectVersion, 'license' => get_option('whcmsConnect_license_key'), 'item_id' => whcmsConnectId, 'author' => WhmcsConnectAuther, 'beta' => false]);
- }
- static public function whcmsConnectProcced()
- {
- global $wp_version;
- $license = trim(get_option('whcmsConnect_license_key'));
- $api_params = ['edd_action' => 'check_license', 'license' => $license, 'item_id' => whcmsConnectId, 'url' => home_url()];
- $response = wp_remote_post(whcmsApiLink, ['timeout' => 15, 'sslverify' => false, 'body' => $api_params]);
- if (is_wp_error($response)) {
- return false;
- exit();
- }
- $license_data = json_decode(wp_remote_retrieve_body($response));
- if (!empty($license_data)) {
- if (isset($license_data->license) && ($license_data->license == 'valid')) {
- update_option('whcmsConnect_license_status', 'valid');
- return true;
- .......................................................................
- ...........................................
- ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement