| @@ -9,9 +9,9 @@ | ||
| 9 | 9 | public $brandname = 'WP Remote'; |
| 10 | 10 | public $badgeinfo = 'wprbadge'; |
| 11 | 11 | public $ip_header_option = 'wpripheader'; |
| 12 | 12 | public $brand_option = 'wprbrand'; |
| 13 | - public $version = '5.41'; | |
| 13 | + public $version = '4.81'; | |
| 14 | 14 | public $webpage = 'https://wpremote.com'; |
| 15 | 15 | public $appurl = 'https://app.wpremote.com'; |
| 16 | 16 | public $slug = 'wpremote/plugin.php'; |
| 17 | 17 | public $plug_redirect = 'wprredirect'; |
| @@ -17,12 +17,10 @@ | ||
| 17 | 17 | public $plug_redirect = 'wprredirect'; |
| 18 | 18 | public $logo = '../img/wprlogo.png'; |
| 19 | 19 | public $brand_icon = '/img/icon.png'; |
| 20 | 20 | public $services_option_name = 'wprconfig'; |
| 21 | - public $author = 'WP Remote'; | |
| 22 | - public $title = 'WP Remote'; | |
| 23 | 21 | |
| 24 | - const DB_VERSION = '4'; | |
| 22 | + const DB_VERSION = '3'; | |
| 25 | 23 | |
| 26 | 24 | public function __construct($settings) { |
| 27 | 25 | $this->settings = $settings; |
| 28 | 26 | $this->config = $this->settings->getOption($this->services_option_name); |
| @@ -39,25 +37,8 @@ | ||
| 39 | 37 | public function hasValidDBVersion() { |
| 40 | 38 | return WPRInfo::DB_VERSION === $this->getCurrentDBVersion(); |
| 41 | 39 | } |
| 42 | 40 | |
| 43 | - public function getLatestWooCommerceDBVersion() { | |
| 44 | - if (defined('WC_ABSPATH') && file_exists(WC_ABSPATH . 'includes/class-wc-install.php')) { | |
| 45 | - include_once WC_ABSPATH . 'includes/class-wc-install.php'; | |
| 46 | - | |
| 47 | - if (class_exists('WC_Install')) { | |
| 48 | - $update_versions = array_keys(WC_Install::get_db_update_callbacks()); | |
| 49 | - | |
| 50 | - if (!empty($update_versions)) { | |
| 51 | - asort($update_versions); | |
| 52 | - return end($update_versions); | |
| 53 | - } | |
| 54 | - } | |
| 55 | - } | |
| 56 | - | |
| 57 | - return false; | |
| 58 | - } | |
| 59 | - | |
| 60 | 41 | public static function getRequestID() { |
| 61 | 42 | if (!defined("BV_REQUEST_ID")) { |
| 62 | 43 | define("BV_REQUEST_ID", uniqid(mt_rand())); |
| 63 | 44 | } |
| @@ -123,18 +104,13 @@ | ||
| 123 | 104 | } |
| 124 | 105 | |
| 125 | 106 | public function isValidEnvironment(){ |
| 126 | 107 | $bvsiteinfo = new WPRWPSiteInfo(); |
| 108 | + $siteurl = $bvsiteinfo->siteurl(); | |
| 127 | 109 | $bvconfig = $this->config; |
| 128 | - | |
| 129 | - if (is_multisite()) { | |
| 130 | - return true; | |
| 131 | - } elseif ($bvconfig && array_key_exists("siteurl_scheme", $bvconfig)) { | |
| 132 | - $siteurl = $bvsiteinfo->siteurl('', $bvconfig["siteurl_scheme"]); | |
| 133 | - if (array_key_exists("abspath", $bvconfig) && | |
| 134 | - array_key_exists("siteurl", $bvconfig) && !empty($siteurl)) { | |
| 135 | - return ($bvconfig["abspath"] == ABSPATH && $bvconfig["siteurl"] == $siteurl); | |
| 136 | - } | |
| 110 | + if ($bvconfig && array_key_exists("abspath", $bvconfig) && | |
| 111 | + array_key_exists("siteurl", $bvconfig) && !empty($siteurl)) { | |
| 112 | + return ($bvconfig["abspath"] == ABSPATH && $bvconfig["siteurl"] == $siteurl); | |
| 137 | 113 | } |
| 138 | 114 | return true; |
| 139 | 115 | } |
| 140 | 116 | |