Changeset 3251921
- Timestamp:
- 03/07/2025 12:19:52 AM (13 months ago)
- Location:
- subscriptions-for-woo
- Files:
-
- 4 edited
-
tags/2.4.7/classes/PPSFWOO/class-ppsfwoo-plan.php (modified) (2 diffs)
-
tags/2.4.7/classes/PPSFWOO/class-ppsfwoo-webhook.php (modified) (3 diffs)
-
trunk/classes/PPSFWOO/class-ppsfwoo-plan.php (modified) (2 diffs)
-
trunk/classes/PPSFWOO/class-ppsfwoo-webhook.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
subscriptions-for-woo/tags/2.4.7/classes/PPSFWOO/class-ppsfwoo-plan.php
r3251915 r3251921 219 219 $env = $this->env; 220 220 221 PluginMain::clear_option_cache('ppsfwoo_plans'); 222 221 223 update_option('ppsfwoo_plans', [ 222 224 $env => $plans 223 225 ]); 224 226 225 return $ PluginMain::get_option('ppsfwoo_plans');227 return $plans; 226 228 } 227 229 … … 315 317 $PluginMain = PluginMain::get_instance(); 316 318 317 $plans = $PluginMain->ppsfwoo_plans[$PluginMain->env['env']] ?? []; 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 ?? []; 318 324 319 325 if($plans) { -
subscriptions-for-woo/tags/2.4.7/classes/PPSFWOO/class-ppsfwoo-webhook.php
r3251915 r3251921 5 5 use PPSFWOO\PayPal, 6 6 PPSFWOO\Subscriber, 7 PPSFWOO\PluginMain; 7 PPSFWOO\PluginMain, 8 PPSFWOO\Exception; 8 9 9 10 class Webhook … … 213 214 $event_types = $response['response']['event_types']; 214 215 215 } else if( isset($response['error']) && $response['error'] === "WEBHOOK_URL_ALREADY_EXISTS") {216 } else if(!PayPal::response_status_is($response, 201)) { 216 217 217 218 $response = $this->patch(true); … … 236 237 237 238 } catch(\Exception $e) { 239 240 Exception::log($e); 238 241 239 242 return false; -
subscriptions-for-woo/trunk/classes/PPSFWOO/class-ppsfwoo-plan.php
r3251915 r3251921 219 219 $env = $this->env; 220 220 221 PluginMain::clear_option_cache('ppsfwoo_plans'); 222 221 223 update_option('ppsfwoo_plans', [ 222 224 $env => $plans 223 225 ]); 224 226 225 return $ PluginMain::get_option('ppsfwoo_plans');227 return $plans; 226 228 } 227 229 … … 315 317 $PluginMain = PluginMain::get_instance(); 316 318 317 $plans = $PluginMain->ppsfwoo_plans[$PluginMain->env['env']] ?? []; 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 ?? []; 318 324 319 325 if($plans) { -
subscriptions-for-woo/trunk/classes/PPSFWOO/class-ppsfwoo-webhook.php
r3243512 r3251921 5 5 use PPSFWOO\PayPal, 6 6 PPSFWOO\Subscriber, 7 PPSFWOO\PluginMain; 7 PPSFWOO\PluginMain, 8 PPSFWOO\Exception; 8 9 9 10 class Webhook … … 213 214 $event_types = $response['response']['event_types']; 214 215 215 } else if( isset($response['error']) && $response['error'] === "WEBHOOK_URL_ALREADY_EXISTS") {216 } else if(!PayPal::response_status_is($response, 201)) { 216 217 217 218 $response = $this->patch(true); … … 236 237 237 238 } catch(\Exception $e) { 239 240 Exception::log($e); 238 241 239 242 return false;
Note: See TracChangeset
for help on using the changeset viewer.