Changeset 3255406
- Timestamp:
- 03/13/2025 01:52:05 PM (13 months ago)
- Location:
- subscriptions-for-woo
- Files:
-
- 44 added
- 5 edited
-
tags/2.5.1 (added)
-
tags/2.5.1/autoload.php (added)
-
tags/2.5.1/classes (added)
-
tags/2.5.1/classes/PPSFWOO (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-ajax-actions-priv.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-ajax-actions.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-database.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-exception.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-order.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-pay-pal.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-plan.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-plugin-main.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-product.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-subscriber.php (added)
-
tags/2.5.1/classes/PPSFWOO/class-ppsfwoo-webhook.php (added)
-
tags/2.5.1/css (added)
-
tags/2.5.1/css/frontend.css (added)
-
tags/2.5.1/css/frontend.min.css (added)
-
tags/2.5.1/css/style.css (added)
-
tags/2.5.1/css/style.min.css (added)
-
tags/2.5.1/js (added)
-
tags/2.5.1/js/get-sub.js (added)
-
tags/2.5.1/js/get-sub.min.js (added)
-
tags/2.5.1/js/main.js (added)
-
tags/2.5.1/js/main.min.js (added)
-
tags/2.5.1/js/paypal-button.js (added)
-
tags/2.5.1/js/paypal-button.min.js (added)
-
tags/2.5.1/license.txt (added)
-
tags/2.5.1/readme.txt (added)
-
tags/2.5.1/subscriptions-for-woo.php (added)
-
tags/2.5.1/templates (added)
-
tags/2.5.1/templates/edit-user.php (added)
-
tags/2.5.1/templates/options-page.php (added)
-
tags/2.5.1/templates/paypal-button.php (added)
-
tags/2.5.1/templates/subscriber-table-settings-page.php (added)
-
tags/2.5.1/templates/tab-content (added)
-
tags/2.5.1/templates/tab-content/go-pro.php (added)
-
tags/2.5.1/templates/tab-content/tab-advanced.php (added)
-
tags/2.5.1/templates/tab-content/tab-general.php (added)
-
tags/2.5.1/templates/tab-content/tab-plans.php (added)
-
tags/2.5.1/templates/tab-content/tab-subscribers.php (added)
-
tags/2.5.1/templates/table-plans.php (added)
-
tags/2.5.1/templates/table-webhooks.php (added)
-
tags/2.5.1/templates/thank-you.php (added)
-
trunk/classes/PPSFWOO/class-ppsfwoo-plan.php (modified) (1 diff)
-
trunk/classes/PPSFWOO/class-ppsfwoo-plugin-main.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/subscriptions-for-woo.php (modified) (3 diffs)
-
trunk/templates/table-plans.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
subscriptions-for-woo/trunk/classes/PPSFWOO/class-ppsfwoo-plan.php
r3255029 r3255406 12 12 $frequency, 13 13 $price, 14 $plan_name, 14 15 $product_name, 15 16 $version, -
subscriptions-for-woo/trunk/classes/PPSFWOO/class-ppsfwoo-plugin-main.php
r3255029 r3255406 203 203 add_action('ppsfwoo_cron_resubscribe_webhooks', [Webhook::get_instance(), 'resubscribe']); 204 204 205 add_action('ppsfwoo_refresh_plans', [AjaxActionsPriv::class, 'refresh_plans']);206 207 205 add_action('admin_menu', [$this, 'register_options_page']); 208 206 … … 704 702 public function plugin_deactivation() 705 703 { 704 delete_transient('ppsfwoo_refresh_plans_ran'); 705 706 706 if("1" === $this->ppsfwoo_delete_plugin_data) { 707 707 708 new Database("DROP TABLE IF EXISTS {$GLOBALS['wpdb']->base_prefix}ppsfwoo_subscriber"); 708 new Database("SET FOREIGN_KEY_CHECKS = 0;"); 709 710 new Database("DROP TABLE IF EXISTS {$GLOBALS['wpdb']->base_prefix}ppsfwoo_subscriber;"); 711 712 new Database("SET FOREIGN_KEY_CHECKS = 1;"); 709 713 710 714 Webhook::get_instance()->delete(); -
subscriptions-for-woo/trunk/readme.txt
r3255029 r3255406 4 4 License: GPLv2 or later 5 5 License URI: http://www.gnu.org/licenses/gpl-2.0.html 6 Stable tag: 2.5 6 Stable tag: 2.5.1 7 7 WC tested up to: 9.7.1 8 8 Requires at least: 6.4.3 … … 106 106 == Changelog == 107 107 108 = 2.5.1 = 109 * Bugfix: plans not refreshing on plugin activation 110 108 111 = 2.5 = 109 112 * Bugfix: product general settings missing on product type change … … 112 115 * Improvement: update validate_callback on rest_api_init 113 116 * Improvement: general refactoring for efficiency & clarity 114 115 117 116 118 = 2.4.9 = -
subscriptions-for-woo/trunk/subscriptions-for-woo.php
r3255029 r3255406 8 8 * License: GPLv2 or later 9 9 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 * Version: 2.5 10 * Version: 2.5.1 11 11 * WC requires at least: 8.6.0 12 12 * WC tested up to: 9.7.1 … … 19 19 20 20 use PPSFWOO\PluginMain, 21 PPSFWOO\AjaxActionsPriv, 21 22 PPSFWOO\Product, 22 23 PPSFWOO\PluginExtras, … … 44 45 45 46 add_action('upgrader_process_complete', [PluginMain::class, 'upgrader_process_complete'], 10, 2); 47 48 add_action('ppsfwoo_refresh_plans', [AjaxActionsPriv::class, 'refresh_plans']); 46 49 47 50 add_action('plugins_loaded', function() { -
subscriptions-for-woo/trunk/templates/table-plans.php
r3251356 r3255406 13 13 </tr> 14 14 <?php 15 foreach ($plans as $plan_id => $plan) 16 { 17 $plan_active = "ACTIVE" === $plan->status; 15 if(!isset($plans['000'])) { 18 16 19 $paypal_action = $plan_active ? 'deactivate': 'activate'; 17 foreach ($plans as $plan_id => $plan) 18 { 19 $plan_active = "ACTIVE" === $plan->status; 20 20 21 $status_indicator = $plan_active ? 'green': 'red';21 $paypal_action = $plan_active ? 'deactivate': 'activate'; 22 22 23 $formatter = new \NumberFormatter('en_US', \NumberFormatter::CURRENCY);23 $status_indicator = $plan_active ? 'green': 'red'; 24 24 25 ?> 26 <tr class="plan-row"> 27 <td><a href='<?php echo esc_url($paypal_url); ?>/billing/plans/<?php echo esc_attr($plan_id); ?>' target='_blank'><?php echo esc_html($plan_id); ?></a></td> 28 <td><?php echo esc_html($plan->name); ?></td> 29 <td><?php echo esc_html($plan->product_name); ?></td> 30 <td><?php echo esc_html($plan->frequency); ?></td> 31 <td><?php echo esc_html($formatter->formatCurrency($plan->price, 'USD')); ?></td> 32 <td> 33 <p class="copy-text"><?php echo esc_url($paypal_url); ?>/webapps/billing/plans/subscribe?plan_id=<?php echo esc_html($plan_id); ?></p> 34 <button class="copy-button">Copy to clipboard</button> 35 </td> 36 <td><span class='tooltip status <?php echo esc_attr($status_indicator); ?>'><span class='tooltip-text'><?php echo esc_html($plan->status); ?></span></span></td> 37 <td><a href='#' class='<?php echo esc_attr($paypal_action); ?>' data-plan-id='<?php echo esc_attr($plan_id); ?>' data-nonce='<?php echo esc_attr(wp_create_nonce('modify_plan')); ?>'><?php echo esc_html(ucfirst($paypal_action)); ?></a></td> 38 </tr> 39 <?php 25 $formatter = new \NumberFormatter('en_US', \NumberFormatter::CURRENCY); 26 27 ?> 28 <tr class="plan-row"> 29 <td><a href='<?php echo esc_url($paypal_url); ?>/billing/plans/<?php echo esc_attr($plan_id); ?>' target='_blank'><?php echo esc_html($plan_id); ?></a></td> 30 <td><?php echo esc_html($plan->name); ?></td> 31 <td><?php echo esc_html($plan->product_name); ?></td> 32 <td><?php echo esc_html($plan->frequency); ?></td> 33 <td><?php echo esc_html($formatter->formatCurrency($plan->price, 'USD')); ?></td> 34 <td> 35 <p class="copy-text"><?php echo esc_url($paypal_url); ?>/webapps/billing/plans/subscribe?plan_id=<?php echo esc_html($plan_id); ?></p> 36 <button class="copy-button">Copy to clipboard</button> 37 </td> 38 <td><span class='tooltip status <?php echo esc_attr($status_indicator); ?>'><span class='tooltip-text'><?php echo esc_html($plan->status); ?></span></span></td> 39 <td><a href='#' class='<?php echo esc_attr($paypal_action); ?>' data-plan-id='<?php echo esc_attr($plan_id); ?>' data-nonce='<?php echo esc_attr(wp_create_nonce('modify_plan')); ?>'><?php echo esc_html(ucfirst($paypal_action)); ?></a></td> 40 </tr> 41 <?php 42 } 43 40 44 } 41 45 ?>
Note: See TracChangeset
for help on using the changeset viewer.