Plugin Directory

Changeset 2795847


Ignore:
Timestamp:
10/08/2022 01:54:06 AM (3 years ago)
Author:
vark
Message:

woo version acknowledgement

Location:
pricing-deals-for-woocommerce/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pricing-deals-for-woocommerce/trunk/readme.txt

    r2791573 r2795847  
    2626*   WordPress 6.0+
    2727*   Gutenberg
    28 *   WooCommerce 6.9+
     28*   WooCommerce 7.0+
    2929*   PHP 8.1+
    3030
  • pricing-deals-for-woocommerce/trunk/vt-pricing-deals.php

    r2791573 r2795847  
    88Author URI: http://varktech.com
    99WC requires at least: 2.4.0
    10 WC tested up to: 6.9.4
     10WC tested up to: 7.0
    1111*/
    1212
     
    6767    define('VTPRD_VERSION',                               '2.0.3.1');  //v2.0.3.1 no change, just for version control
    6868    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');
    7070    define('VTPRD_DIRNAME',                               ( dirname( __FILE__ ) ));
    7171    define('VTPRD_URL',                                   plugins_url( '', __FILE__ ) );
     
    7676    define('VTPRD_PRO_PLUGIN_FOLDER',                    'pricing-deals-pro-for-woocommerce');    //v1.1.5
    7777    define('VTPRD_PRO_PLUGIN_FILE',                      'vt-pricing-deals-pro.php');    //v1.1.5   
    78    
     78
    7979    define('VTPRD_PRO_PLUGIN_NAME',                      'Varktech Pricing Deals PRO for WooCommerce');    //v1.0.7.1
    8080
     
    858858     if ( !current_user_can( 'edit_posts', 'vtprd-rule' ) )
    859859          return;
    860     */   
     860    */       
    861861     
    862862     $vtprd_rules_ui = new VTPRD_Rules_UI;
     
    13651365
    13661366        //shifted here from the 2 pages, so we don't use onclick!!
     1367        //this highlights a textarea for copying to support
    13671368        if ( (strpos($pageURL,'vtprd_license_options_page') !== false) ||
    13681369             (strpos($pageURL,'vtprd_show_help_page') !== false) ) {
     
    17331734      if (defined('VTPRD_PRO_VERSION'))  {
    17341735         $php_version = phpversion();
    1735          if ( version_compare( $php_version, '5.3.1', '<' ) ) {                 
    1736             $message  =  '<h4>' . __('- ' , 'vtprd') .VTPRD_PRO_PLUGIN_NAME. __(' - PHP version must be &nbsp;==>&nbsp; 5.3.1 &nbsp;<==&nbsp; 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 &nbsp;==>&nbsp; 7.0 &nbsp;<==&nbsp; or greater, to run this PRO plugin successfully. ' , 'vtprd') . '</h4>' ;
    17371738            $message .=  '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . 'Your PHP version is currently &nbsp;' .  $php_version ;           
    17381739            $message .=  '<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . '- Contact your host to upgrade!!!.  ' ;                 
     
    21192120     global $vtprd_license_options, $vtprd_setup_options;
    21202121     
     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         
    21212128     //v1.1.7.2 grpB begin
    21222129     /*
     
    21422149      //VTPRD_PRO_VERSION only exists if PRO version is installed and active
    21432150    if (defined('VTPRD_PRO_VERSION')) { //v1.1.6.1
    2144       //$this->vtprd_maybe_rego_clock_action(); //pro only //v1.1.6.3 REMOVED
     2151
    21452152      $this->vtprd_maybe_pro_deactivate_action(); //pro only
    21462153      $this->vtprd_license_count_check(); //pro only
     
    22562263  } 
    22572264 
    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
    23402266       
    23412267  /* ************************************************
Note: See TracChangeset for help on using the changeset viewer.