Plugin Directory

Changeset 3252223


Ignore:
Timestamp:
03/07/2025 02:39:47 PM (13 months ago)
Author:
marknokes
Message:

2.4.7

  • Feature: add subscription start time to order details
  • Bugfix: plans not updating in gui on plugin activation when using redis cache
  • Bugfix: plugin reactivation causes database error on upgrade
  • Improvement: increase timeout for wp_remote_request
  • Improvement: isset check for plan_id and product_id in ajax actions
  • Improvement: change Order set_taxes method from private to public static
Location:
subscriptions-for-woo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • subscriptions-for-woo/tags/2.4.7/classes/PPSFWOO/class-ppsfwoo-plan.php

    r3251921 r3252223  
    315315        $plan_objects = [];
    316316
    317         $PluginMain = PluginMain::get_instance();
    318 
    319         $maybe_string = PluginMain::get_option('ppsfwoo_plans');
    320 
    321         $array = is_array($maybe_string) ? $maybe_string[$PluginMain->env['env']]: unserialize($maybe_string)[$PluginMain->env['env']];
    322 
    323         $plans = $array ?? [];
    324 
    325         if($plans) {
    326 
    327             foreach($plans as $plan_id => $plan)
     317        $plans = PluginMain::get_option('ppsfwoo_plans');
     318
     319        $env = PayPal::env()['env'];
     320
     321        if($plans && isset($plans[$env])) {
     322
     323            foreach($plans[$env] as $plan_id => $plan)
    328324            {
    329325
  • subscriptions-for-woo/tags/2.4.7/classes/PPSFWOO/class-ppsfwoo-plugin-main.php

    r3251915 r3252223  
    407407        } else {
    408408
    409             return $cached_value;
     409            return maybe_unserialize($cached_value);
    410410
    411411        }
  • subscriptions-for-woo/trunk/classes/PPSFWOO/class-ppsfwoo-plan.php

    r3251921 r3252223  
    315315        $plan_objects = [];
    316316
    317         $PluginMain = PluginMain::get_instance();
    318 
    319         $maybe_string = PluginMain::get_option('ppsfwoo_plans');
    320 
    321         $array = is_array($maybe_string) ? $maybe_string[$PluginMain->env['env']]: unserialize($maybe_string)[$PluginMain->env['env']];
    322 
    323         $plans = $array ?? [];
    324 
    325         if($plans) {
    326 
    327             foreach($plans as $plan_id => $plan)
     317        $plans = PluginMain::get_option('ppsfwoo_plans');
     318
     319        $env = PayPal::env()['env'];
     320
     321        if($plans && isset($plans[$env])) {
     322
     323            foreach($plans[$env] as $plan_id => $plan)
    328324            {
    329325
  • subscriptions-for-woo/trunk/classes/PPSFWOO/class-ppsfwoo-plugin-main.php

    r3251915 r3252223  
    407407        } else {
    408408
    409             return $cached_value;
     409            return maybe_unserialize($cached_value);
    410410
    411411        }
Note: See TracChangeset for help on using the changeset viewer.