Changeset 2795847
- Timestamp:
- 10/08/2022 01:54:06 AM (3 years ago)
- Location:
- pricing-deals-for-woocommerce/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
vt-pricing-deals.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pricing-deals-for-woocommerce/trunk/readme.txt
r2791573 r2795847 26 26 * WordPress 6.0+ 27 27 * Gutenberg 28 * WooCommerce 6.9+28 * WooCommerce 7.0+ 29 29 * PHP 8.1+ 30 30 -
pricing-deals-for-woocommerce/trunk/vt-pricing-deals.php
r2791573 r2795847 8 8 Author URI: http://varktech.com 9 9 WC requires at least: 2.4.0 10 WC tested up to: 6.9.410 WC tested up to: 7.0 11 11 */ 12 12 … … 67 67 define('VTPRD_VERSION', '2.0.3.1'); //v2.0.3.1 no change, just for version control 68 68 define('VTPRD_MINIMUM_PRO_VERSION', '2.0.3'); 69 define('VTPRD_LAST_UPDATE_DATE', '2022- 09-28');69 define('VTPRD_LAST_UPDATE_DATE', '2022-10-05'); 70 70 define('VTPRD_DIRNAME', ( dirname( __FILE__ ) )); 71 71 define('VTPRD_URL', plugins_url( '', __FILE__ ) ); … … 76 76 define('VTPRD_PRO_PLUGIN_FOLDER', 'pricing-deals-pro-for-woocommerce'); //v1.1.5 77 77 define('VTPRD_PRO_PLUGIN_FILE', 'vt-pricing-deals-pro.php'); //v1.1.5 78 78 79 79 define('VTPRD_PRO_PLUGIN_NAME', 'Varktech Pricing Deals PRO for WooCommerce'); //v1.0.7.1 80 80 … … 858 858 if ( !current_user_can( 'edit_posts', 'vtprd-rule' ) ) 859 859 return; 860 */ 860 */ 861 861 862 862 $vtprd_rules_ui = new VTPRD_Rules_UI; … … 1365 1365 1366 1366 //shifted here from the 2 pages, so we don't use onclick!! 1367 //this highlights a textarea for copying to support 1367 1368 if ( (strpos($pageURL,'vtprd_license_options_page') !== false) || 1368 1369 (strpos($pageURL,'vtprd_show_help_page') !== false) ) { … … 1733 1734 if (defined('VTPRD_PRO_VERSION')) { 1734 1735 $php_version = phpversion(); 1735 if ( version_compare( $php_version, ' 5.3.1', '<' ) ) {1736 $message = '<h4>' . __('- ' , 'vtprd') .VTPRD_PRO_PLUGIN_NAME. __(' - PHP version must be ==> 5.3.1 <== or greater, to run this PRO plugin successfully. ' , 'vtprd') . '</h4>' ;1736 if ( version_compare( $php_version, '7.0', '<' ) ) { 1737 $message = '<h4>' . __('- ' , 'vtprd') .VTPRD_PRO_PLUGIN_NAME. __(' - PHP version must be ==> 7.0 <== or greater, to run this PRO plugin successfully. ' , 'vtprd') . '</h4>' ; 1737 1738 $message .= ' ' . 'Your PHP version is currently ' . $php_version ; 1738 1739 $message .= '<br><br> ' . '- Contact your host to upgrade!!!. ' ; … … 2119 2120 global $vtprd_license_options, $vtprd_setup_options; 2120 2121 2122 //v2.0.3.1 begin 2123 if (!class_exists('VTPRD_Rules_UI')) { 2124 $this->vtprd_controller_init(); //v2.0.0.1 rerun controller init for ManageWP and InfiniteWP conflicts 2125 } 2126 //v2.0.3.1 end 2127 2121 2128 //v1.1.7.2 grpB begin 2122 2129 /* … … 2142 2149 //VTPRD_PRO_VERSION only exists if PRO version is installed and active 2143 2150 if (defined('VTPRD_PRO_VERSION')) { //v1.1.6.1 2144 //$this->vtprd_maybe_rego_clock_action(); //pro only //v1.1.6.3 REMOVED 2151 2145 2152 $this->vtprd_maybe_pro_deactivate_action(); //pro only 2146 2153 $this->vtprd_license_count_check(); //pro only … … 2256 2263 } 2257 2264 2258 2259 /* ************************************************ 2260 ** Admin - v1.1.5 new function 2261 * //only runs if PRO version is installed and active 2262 * *********************** 2263 * v1.1.6.1 REFACTORED 2264 * *********************** 2265 *************************************************** */ 2266 public function vtprd_maybe_rego_clock_action() { 2267 2268 //Client has one week to register successfully! 2269 2270 global $vtprd_license_options; 2271 2272 //only EVER do this once, with VERY FIRST registration!!!!!!!!!!!!! 2273 if ( (isset($vtprd_license_options['rego_done'])) && 2274 ($vtprd_license_options['rego_done'] == 'yes') ) { 2275 return; 2276 } 2277 2278 //if all good, get rid of rego_clock and exit 2279 if ( ($vtprd_license_options['status'] == 'valid') && 2280 ($vtprd_license_options['pro_plugin_version_status'] == 'valid') ) { //deactivated status ok 2281 if (get_option('vtprd_rego_clock')) { 2282 delete_option('vtprd_rego_clock'); 2283 } 2284 $vtprd_license_options['rego_done'] = 'yes'; 2285 update_option('vtprd_license_options', $vtprd_license_options); 2286 return; 2287 } 2288 2289 2290 //if alrady toast, exit stage left 2291 if ( ($vtprd_license_options['pro_deactivate'] == 'yes') || 2292 ($vtprd_license_options['state'] == 'suspended-by-vendor') || 2293 ($vtprd_license_options['state'] == 'deactivated') || //allow deactivated through, as a 'resting' state 2294 (($vtprd_license_options['pro_plugin_version_status'] > null) && 2295 ($vtprd_license_options['pro_plugin_version_status'] != 'valid')) ) { //if 'pro_plugin_version_status' = null, this is unregistered, carry on... 2296 return; 2297 } 2298 2299 2300 //if License or Plugins Page in progress, exit - user may be activating or otherwise fixing things 2301 //$pageURL = $_SERVER["REQUEST_URI"]; //v2.0.3 2302 $pageURL = sanitize_url($_SERVER["REQUEST_URI"]); //v2.0.3 2303 if ( (strpos($pageURL,'vtprd_license_options_page') !== false ) || 2304 (strpos($pageURL,'plugins.php') !== false) || 2305 (strpos($pageURL,'admin-ajax.php') !== false) ) { //wordpress sometimes returns admin-ajax.php IN ERROR, so handle that here 2306 return; 2307 } 2308 2309 //if already there, get clock, else create and exit 2310 if (get_option('vtprd_rego_clock')) { 2311 $vtprd_rego_clock = get_option('vtprd_rego_clock'); 2312 } else { 2313 $vtprd_rego_clock = time(); 2314 update_option('vtprd_rego_clock',$vtprd_rego_clock); 2315 return; 2316 } 2317 2318 $today = time(); 2319 2320 //test begin 2321 /* 2322 $vtprd_rego_clock = 164902187; 2323 //error_log( print_r( '$pageURL = ' .$pageURL , true ) ); 2324 global $pagenow; 2325 //error_log( print_r( '$pagenow = ' .$pagenow , true ) ); 2326 */ 2327 //test end 2328 /* //v1.1.7.2 removed to prevent user problems!! 2329 //if registration not resolved in 1 week 2330 if (($today - $vtprd_rego_clock) > 604800) { 2331 $vtprd_license_options['pro_deactivate'] = 'yes'; 2332 $vtprd_license_options['msg'] = 'Registration not accomplished within 1 week allotted, PRO plugin suspended'; 2333 $vtprd_license_options['state'] = 'suspended-by-vendor'; 2334 //options update happens in pro_deactivate_action... 2335 } 2336 */ 2337 2338 return; 2339 } 2265 2340 2266 2341 2267 /* ************************************************
Note: See TracChangeset
for help on using the changeset viewer.