Plugin Directory

Changeset 1158097


Ignore:
Timestamp:
05/11/2015 05:15:36 PM (11 years ago)
Author:
websitezcom
Message:

Fixing activation for PRO version

Location:
wp-mobile-detector
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-mobile-detector/tags/3.1/admin/upgrade.php

    r1156534 r1158097  
    99            'licence_key' => $_POST['licence_key'],
    1010            'product_id' => 'WP Mobile Detector',
    11             'instance' => $websitez_options['general']['password'],
    1211            'software_version' => WEBSITEZ_PLUGIN_VERSION,
    1312            'platform' => ''
    1413        );
     14        $data['instance'] = websitez_gen_uuid();
    1515        $args = array(
    1616            'timeout' => 15,
     
    2323        if(array_key_exists('body', $response) && strlen($response['body']) > 0){
    2424            $result = json_decode($response['body'], true);
    25             if($result['activated'] === true){
     25            if($result['activated'] == true){
     26                $websitez_options['general']['password'] = $data['instance'];
     27                websitez_set_options($websitez_options);
    2628                wp_schedule_event( time(), 'monthly', 'websitez_do_filter' );
    2729                update_option(WEBSITEZ_LICENSE_KEY_NAME, $data['licence_key']);
     
    2931                $message = 'You have successfully upgraded the plugin!';
    3032            }else{
    31                 $message .= " ".$response['body'];
     33                $message .= " ".$response['body']." | ".json_encode($data);
    3234            }
    3335        }else{
  • wp-mobile-detector/tags/3.1/functions.php

    r1156549 r1158097  
    579579            "posts_per_page"=>"10",
    580580            "display_to_tablet"=>"no",
    581             "password" => websitez_gen_uuid(),
    582581            "record_stats" => "true"
    583582        ),
     
    613612    if(!$websitez_options){
    614613        websitez_set_options($websitez_options_default);
    615     }else{
    616         if(strlen($websitez_options['general']['password']) == 0){
    617             $websitez_options['general']['password'] = websitez_gen_uuid();
    618             websitez_set_options($websitez_options);
    619         }
    620614    }
    621615   
  • wp-mobile-detector/trunk/admin/upgrade.php

    r1156534 r1158097  
    99            'licence_key' => $_POST['licence_key'],
    1010            'product_id' => 'WP Mobile Detector',
    11             'instance' => $websitez_options['general']['password'],
    1211            'software_version' => WEBSITEZ_PLUGIN_VERSION,
    1312            'platform' => ''
    1413        );
     14        $data['instance'] = websitez_gen_uuid();
    1515        $args = array(
    1616            'timeout' => 15,
     
    2323        if(array_key_exists('body', $response) && strlen($response['body']) > 0){
    2424            $result = json_decode($response['body'], true);
    25             if($result['activated'] === true){
     25            if($result['activated'] == true){
     26                $websitez_options['general']['password'] = $data['instance'];
     27                websitez_set_options($websitez_options);
    2628                wp_schedule_event( time(), 'monthly', 'websitez_do_filter' );
    2729                update_option(WEBSITEZ_LICENSE_KEY_NAME, $data['licence_key']);
     
    2931                $message = 'You have successfully upgraded the plugin!';
    3032            }else{
    31                 $message .= " ".$response['body'];
     33                $message .= " ".$response['body']." | ".json_encode($data);
    3234            }
    3335        }else{
  • wp-mobile-detector/trunk/functions.php

    r1156549 r1158097  
    579579            "posts_per_page"=>"10",
    580580            "display_to_tablet"=>"no",
    581             "password" => websitez_gen_uuid(),
    582581            "record_stats" => "true"
    583582        ),
     
    613612    if(!$websitez_options){
    614613        websitez_set_options($websitez_options_default);
    615     }else{
    616         if(strlen($websitez_options['general']['password']) == 0){
    617             $websitez_options['general']['password'] = websitez_gen_uuid();
    618             websitez_set_options($websitez_options);
    619         }
    620614    }
    621615   
Note: See TracChangeset for help on using the changeset viewer.