Changeset 3270659
- Timestamp:
- 04/10/2025 06:54:19 PM (12 months ago)
- Location:
- subscriptions-for-woo
- Files:
-
- 44 added
- 11 edited
-
tags/2.5.3/classes/PPSFWOO/class-ppsfwoo-order.php (modified) (1 diff)
-
tags/2.5.3/classes/PPSFWOO/class-ppsfwoo-plugin-main.php (modified) (2 diffs)
-
tags/2.5.3/templates/tab-content/tab-general.php (modified) (1 diff)
-
tags/2.5.4 (added)
-
tags/2.5.4/autoload.php (added)
-
tags/2.5.4/classes (added)
-
tags/2.5.4/classes/PPSFWOO (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-ajax-actions-priv.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-ajax-actions.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-database.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-exception.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-order.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-pay-pal.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-plan.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-plugin-main.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-product.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-subscriber.php (added)
-
tags/2.5.4/classes/PPSFWOO/class-ppsfwoo-webhook.php (added)
-
tags/2.5.4/css (added)
-
tags/2.5.4/css/frontend.css (added)
-
tags/2.5.4/css/frontend.min.css (added)
-
tags/2.5.4/css/style.css (added)
-
tags/2.5.4/css/style.min.css (added)
-
tags/2.5.4/js (added)
-
tags/2.5.4/js/get-sub.js (added)
-
tags/2.5.4/js/get-sub.min.js (added)
-
tags/2.5.4/js/main.js (added)
-
tags/2.5.4/js/main.min.js (added)
-
tags/2.5.4/js/paypal-button.js (added)
-
tags/2.5.4/js/paypal-button.min.js (added)
-
tags/2.5.4/license.txt (added)
-
tags/2.5.4/readme.txt (added)
-
tags/2.5.4/subscriptions-for-woo.php (added)
-
tags/2.5.4/templates (added)
-
tags/2.5.4/templates/edit-user.php (added)
-
tags/2.5.4/templates/options-page.php (added)
-
tags/2.5.4/templates/paypal-button.php (added)
-
tags/2.5.4/templates/subscriber-table-settings-page.php (added)
-
tags/2.5.4/templates/tab-content (added)
-
tags/2.5.4/templates/tab-content/go-pro.php (added)
-
tags/2.5.4/templates/tab-content/tab-advanced.php (added)
-
tags/2.5.4/templates/tab-content/tab-general.php (added)
-
tags/2.5.4/templates/tab-content/tab-plans.php (added)
-
tags/2.5.4/templates/tab-content/tab-subscribers.php (added)
-
tags/2.5.4/templates/table-plans.php (added)
-
tags/2.5.4/templates/table-webhooks.php (added)
-
tags/2.5.4/templates/thank-you.php (added)
-
trunk/classes/PPSFWOO/class-ppsfwoo-order.php (modified) (1 diff)
-
trunk/classes/PPSFWOO/class-ppsfwoo-plugin-main.php (modified) (4 diffs)
-
trunk/js/main.js (modified) (1 diff)
-
trunk/js/main.min.js (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/subscriptions-for-woo.php (modified) (1 diff)
-
trunk/templates/tab-content/go-pro.php (modified) (1 diff)
-
trunk/templates/tab-content/tab-general.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
subscriptions-for-woo/tags/2.5.3/classes/PPSFWOO/class-ppsfwoo-order.php
r3259422 r3270659 126 126 $product = $item->get_product(); 127 127 128 if ($product ->is_type(Product::TYPE)) {128 if ($product && $product->is_type(Product::TYPE)) { 129 129 $has_subscription = true; 130 130 -
subscriptions-for-woo/tags/2.5.3/classes/PPSFWOO/class-ppsfwoo-plugin-main.php
r3262268 r3270659 115 115 'sanitize_callback' => 'absint', 116 116 ], 117 'ppsfwoo_discount_offer_expires' => [ 118 'name' => 'Offer expires', 119 'type' => 'number', 120 'min' => 0, 121 'default' => 10, 122 'is_enterprise' => true, 123 'description' => 'Number of days after a subscribtion expiration that the resubscribe offer is valid. 0 = no limit.', 124 'sanitize_callback' => 'absint', 125 ], 117 126 'ppsfwoo_resubscribe_landing_page_id' => [ 118 127 'name' => 'Resubscribe landing page', … … 223 232 */ 224 233 public $ppsfwoo_reminder = 10; 234 235 /** 236 * Number of days after a subscribtion expiration that the resubscribe offer is valid. 0 = no limit. 237 * 238 * @var int 239 */ 240 public $ppsfwoo_discount_offer_expires = 10; 225 241 226 242 /** -
subscriptions-for-woo/tags/2.5.3/templates/tab-content/tab-general.php
r3259422 r3270659 148 148 $value = esc_attr($value); 149 149 150 echo "<input size='2' type='number' min='1' max='100' id='".esc_attr($option)."' name='".esc_attr($name)."' value='".esc_attr($value)."' ".esc_attr($disabled).' />'; 150 $min = $array['min'] ?? 1; 151 152 $max = $array['max'] ?? 100; 153 154 echo "<input size='2' type='number' min='".esc_attr($min)."' max='".esc_attr($max)."' id='".esc_attr($option)."' name='".esc_attr($name)."' value='".esc_attr($value)."' ".esc_attr($disabled).' />'; 151 155 152 156 break; -
subscriptions-for-woo/trunk/classes/PPSFWOO/class-ppsfwoo-order.php
r3259422 r3270659 126 126 $product = $item->get_product(); 127 127 128 if ($product ->is_type(Product::TYPE)) {128 if ($product && $product->is_type(Product::TYPE)) { 129 129 $has_subscription = true; 130 130 -
subscriptions-for-woo/trunk/classes/PPSFWOO/class-ppsfwoo-plugin-main.php
r3262268 r3270659 115 115 'sanitize_callback' => 'absint', 116 116 ], 117 'ppsfwoo_discount_offer_expires' => [ 118 'name' => 'Offer expires', 119 'type' => 'number', 120 'min' => 0, 121 'default' => 10, 122 'is_enterprise' => true, 123 'description' => 'Number of days after a subscribtion expiration that the resubscribe offer is valid. 0 = no limit.', 124 'sanitize_callback' => 'absint', 125 ], 117 126 'ppsfwoo_resubscribe_landing_page_id' => [ 118 127 'name' => 'Resubscribe landing page', … … 225 234 226 235 /** 236 * Number of days after a subscribtion expiration that the resubscribe offer is valid. 0 = no limit. 237 * 238 * @var int 239 */ 240 public $ppsfwoo_discount_offer_expires = 10; 241 242 /** 227 243 * Page that customers will visit upon resubscribing to a canceled subscription. 228 244 * … … 327 343 public $product_type; 328 344 345 /** 346 * Constructor for the Product class. 347 * 348 * @param $product - The product to be assigned to the class 349 */ 329 350 public function __construct($product) 330 351 { … … 493 514 { 494 515 foreach ($tabs as $tab_id => $display_name) { 516 $file = $this->template_dir."tab-content/{$tab_id}.php"; 517 518 if (!file_exists($file)) { 519 continue; 520 } 495 521 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 496 522 $active = isset($_GET['tab']) && $tab_id === $_GET['tab'] ? 'nav-tab-active' : ''; -
subscriptions-for-woo/trunk/js/main.js
r3258064 r3270659 113 113 }); 114 114 }); 115 $('.plan-row ').on('click', '.copy-button', function(e) {115 $('.plan-row, .role-row').on('click', '.copy-button', function(e) { 116 116 var copyText = $(this).prev('.copy-text'), 117 117 tempTextarea = $('<textarea>'); -
subscriptions-for-woo/trunk/js/main.min.js
r3255492 r3270659 1 function ppsfwooDoAjax(e,t,a={}){e={action:"ppsfwoo_admin_ajax_callback",method:e};jQuery.isEmptyObject(a)||(e=jQuery.extend({},e,a)),jQuery.ajax({type:"POST",url:"/wp-admin/admin-ajax.php",data:e,success:t})}function ppsfwooShowLoadingMessage(e){var t=document.createElement("div"),a=(t.setAttribute("role","overlay"),t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.zIndex="1000",document.createElement("div"));a.style.position="absolute",a.style.top="50%",a.style.left="50%",a.style.transform="translate(-50%, -50%)",a.style.backgroundColor="white",a.style.padding="20px",a.style.borderRadius="5px",a.style.boxShadow="0 0 10px rgba(0, 0, 0, 0.3)",a.textContent=e||"Please wait...",t.appendChild(a),document.body.appendChild(t)}function ppsfwooHideLoadingMessage(){var e=document.querySelector('div[role="overlay"]');e&&e.parentNode.removeChild(e)}function ppsfwooShowMsg(e="",t="success"){jQuery("#wpcontent").prepend(`<div style="z-index: 9999; position: fixed; width: 82%" class="notice notice-${t} is-dismissible single-cached"><p>${e}</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>`),setTimeout(function(){jQuery(".notice-dismiss").parent().fadeOut("slow",function(){jQuery(this).remove()})},5e3),jQuery(".notice-dismiss").click(function(e){jQuery(this).parent().remove()})}jQuery(document).ready(function(o){var a;function s(e="tab-plans"){var t=n(window.location.href);window.location.href=t+"&tab="+e}function n(e){var t,a=e.split("?");return 2<=a.length?(t=a[1].split("&").filter(function(e){return!e.startsWith("subs_page_num=")&&!e.startsWith("tab=")}),a[0]+"?"+t.join("&")):e}o("a.deactivate, a.activate").click(function(e){e.preventDefault(),ppsfwooShowLoadingMessage("Processing...");var e=o(this).data("plan-id"),t=o(this).data("nonce");ppsfwooDoAjax("modify_plan",function(e){e=JSON.parse(e);(e.error?(alert(e.error),ppsfwooHideLoadingMessage):s)()},{plan_id:e,paypal_action:o(this).attr("class"),nonce:t})}),o(".plan-row ").on("click",".copy-button",function(e){var t=o(this).prev(".copy-text"),a=o("<textarea>");a.val(t.text()),o("body").append(a),a.select(),a[0].setSelectionRange(0,99999),document.execCommand("copy"),a.remove(),alert("Copied to clipboard: "+t.text()),e.preventDefault()}),ppsfwooHideLoadingMessage(),o("#subs-search").on("submit",function(e){e.preventDefault(),ppsfwooDoAjax("search_subscribers",function(e){e=JSON.parse(e);e.error?ppsfwooShowMsg(e.error,"warning"):(o("#tab-subscribers .pagination, .button.export-table-data").hide(),o("#reset").show(),o("#subscribers").replaceWith(e.html))},{email:o("#email-input").val(),search_by_email:o("#search_by_email").val()})}),o("#refresh").click(function(e){e.preventDefault(),ppsfwooShowLoadingMessage("Processing..."),ppsfwooDoAjax("refresh_plans",function(e){e=JSON.parse(e);0===e.length?ppsfwooShowMsg("No plans found.","warning"):e.success?(ppsfwooShowMsg("Successfully refreshed plans."),s()):e.error?ppsfwooShowMsg(e.error,"error"):ppsfwooShowMsg("There has been an error. Please try again and check your <a href='"+ppsfwoo_ajax_var.settings_url+"'>WooCommerce PayPal Payments settings</a>.","error"),ppsfwooHideLoadingMessage()})}),o(".nav-tab-wrapper a").click(function(e){e.preventDefault(),o(".nav-tab").removeClass("nav-tab-active"),o(this).addClass("nav-tab-active"),o(".tab-content").hide(),a=o(this).attr("href"),o("#"+a).show()}),(o(".nav-tab-wrapper a").hasClass("nav-tab-active")?o(".nav-tab-wrapper a.nav-tab-active"):o(".nav-tab-wrapper a:first-child")).click(),o("#ppsfwoo_options").submit(function(e){var t=n(($element=o(this).find("input[name=_wp_http_referer]")).attr("value"));$element.attr("value",t+"&tab="+a)}),o("input[name=ppsfwoo_delete_plugin_data]").click(function(e){if(o(this).is(":checked"))return confirm("Selecting this option will delete plugin options and the subscribers table on plugin deactivation. Are you sure you want to do this?\n\nThe setting will take effect after you 'Save Changes' below.")})});1 function ppsfwooDoAjax(e,t,a={}){e={action:"ppsfwoo_admin_ajax_callback",method:e};jQuery.isEmptyObject(a)||(e=jQuery.extend({},e,a)),jQuery.ajax({type:"POST",url:"/wp-admin/admin-ajax.php",data:e,success:t})}function ppsfwooShowLoadingMessage(e){var t=document.createElement("div"),a=(t.setAttribute("role","overlay"),t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.zIndex="1000",document.createElement("div"));a.style.position="absolute",a.style.top="50%",a.style.left="50%",a.style.transform="translate(-50%, -50%)",a.style.backgroundColor="white",a.style.padding="20px",a.style.borderRadius="5px",a.style.boxShadow="0 0 10px rgba(0, 0, 0, 0.3)",a.textContent=e||"Please wait...",t.appendChild(a),document.body.appendChild(t)}function ppsfwooHideLoadingMessage(){var e=document.querySelector('div[role="overlay"]');e&&e.parentNode.removeChild(e)}function ppsfwooShowMsg(e="",t="success"){jQuery("#wpcontent").prepend(`<div style="z-index: 9999; position: fixed; width: 82%" class="notice notice-${t} is-dismissible single-cached"><p>${e}</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>`),setTimeout(function(){jQuery(".notice-dismiss").parent().fadeOut("slow",function(){jQuery(this).remove()})},5e3),jQuery(".notice-dismiss").click(function(e){jQuery(this).parent().remove()})}jQuery(document).ready(function(o){var a;function s(e="tab-plans"){var t=n(window.location.href);window.location.href=t+"&tab="+e}function n(e){var t,a=e.split("?");return 2<=a.length?(t=a[1].split("&").filter(function(e){return!e.startsWith("subs_page_num=")&&!e.startsWith("tab=")}),a[0]+"?"+t.join("&")):e}o("a.deactivate, a.activate").click(function(e){e.preventDefault(),ppsfwooShowLoadingMessage("Processing...");var e=o(this).data("plan-id"),t=o(this).data("nonce");ppsfwooDoAjax("modify_plan",function(e){e=JSON.parse(e);(e.error?(alert(e.error),ppsfwooHideLoadingMessage):s)()},{plan_id:e,paypal_action:o(this).attr("class"),nonce:t})}),o(".plan-row, .role-row").on("click",".copy-button",function(e){var t=o(this).prev(".copy-text"),a=o("<textarea>");a.val(t.text()),o("body").append(a),a.select(),a[0].setSelectionRange(0,99999),document.execCommand("copy"),a.remove(),alert("Copied to clipboard: "+t.text()),e.preventDefault()}),ppsfwooHideLoadingMessage(),o("#subs-search").on("submit",function(e){e.preventDefault(),ppsfwooDoAjax("search_subscribers",function(e){e=JSON.parse(e);e.error?ppsfwooShowMsg(e.error,"warning"):(o("#tab-subscribers .pagination, .button.export-table-data").hide(),o("#reset").show(),o("#subscribers").replaceWith(e.html))},{email:o("#email-input").val(),search_by_email:o("#search_by_email").val()})}),o("#refresh").click(function(e){e.preventDefault(),ppsfwooShowLoadingMessage("Processing..."),ppsfwooDoAjax("refresh_plans",function(e){e=JSON.parse(e);0===e.length?ppsfwooShowMsg("No plans found.","warning"):e.success?(ppsfwooShowMsg("Successfully refreshed plans."),s()):e.error?ppsfwooShowMsg(e.error,"error"):ppsfwooShowMsg("There has been an error. Please try again and check your <a href='"+ppsfwoo_ajax_var.settings_url+"'>WooCommerce PayPal Payments settings</a>.","error"),ppsfwooHideLoadingMessage()})}),o(".nav-tab-wrapper a").click(function(e){e.preventDefault(),o(".nav-tab").removeClass("nav-tab-active"),o(this).addClass("nav-tab-active"),o(".tab-content").hide(),a=o(this).attr("href"),o("#"+a).show()}),(o(".nav-tab-wrapper a").hasClass("nav-tab-active")?o(".nav-tab-wrapper a.nav-tab-active"):o(".nav-tab-wrapper a:first-child")).click(),o("#ppsfwoo_options").submit(function(e){var t=n(($element=o(this).find("input[name=_wp_http_referer]")).attr("value"));$element.attr("value",t+"&tab="+a)}),o("input[name=ppsfwoo_delete_plugin_data]").click(function(e){if(o(this).is(":checked"))return confirm("Selecting this option will delete plugin options and the subscribers table on plugin deactivation. Are you sure you want to do this?\n\nThe setting will take effect after you 'Save Changes' below.")})}); -
subscriptions-for-woo/trunk/readme.txt
r3261715 r3270659 4 4 License: GPLv2 or later 5 5 License URI: http://www.gnu.org/licenses/gpl-2.0.html 6 Stable tag: 2.5. 36 Stable tag: 2.5.4 7 7 WC tested up to: 9.7.1 8 8 Requires at least: 6.4.3 … … 13 13 14 14 == Description == 15 16 15 Subscriptions for Woo takes the hassle (and high cost) out of managing subscriptions products and services for your business. Simply create your PayPal subscription products and plans in your PayPal business subscriptions dashboard, and sync them with the plugin. After sync, a new product type "Subscription" is added to the product menu. Selection provides an additional tab where you choose your plan. Save and done! 17 16 18 17 = Offer Subscription payments to help drive repeat business = 19 Create stable, predictable income by offering subscription plans. Subscription plans are created and managed at PayPal, where customer payments are securely maintained. **Consumers are nearly three times more likely to purchase when you offer PayPal.** 20 21 = Purpose built = 22 Built to seamlessly integrate with your WooCommerce store, offering a tailored solution for managing recurring payments and subscriptions. Designed to streamline the subscription process, from setup to management, providing you with the tools you need to drive revenue and foster long-term customer relationships. 23 24 = Low Cost = 25 We understand the importance of cost-effectiveness for businesses of all sizes, which is why we’ve made it our priority to offer a solution that delivers exceptional functionality without breaking the bank. With transparent pricing and no hidden fees, our plugin provides an affordable subscription management solution that maximizes your ROI. 26 27 = Scalability = 28 As your business grows and evolves, our plugin grows with you, seamlessly accommodating increased subscription volumes, expanding product catalogs, and evolving customer needs. You can confidently scale your subscription offerings without worrying about technical limitations or disruptions. 29 30 [Subscriptions for Woo](https://wp-subscriptions.com/) allow business and casual sellers to accept reliable recurring payments on a fixed billing schedule (buyers may require a PayPal account). 31 32 It’s easy for shoppers, simple for you, and great for your business – with no monthly or setup fees. 18 Create stable, predictable income by offering subscription plans. 19 - Subscription plans are created and managed at PayPal where customer payments are securely maintained. **Consumers are nearly three times more likely to purchase when you offer PayPal.** 20 - Built to seamlessly integrate with your WooCommerce store, offering a tailored solution for managing recurring payments and subscriptions. 21 - Designed to streamline the subscription process, from setup to management, providing you with the tools you need to drive revenue and foster long-term customer relationships. 22 - As your business grows and evolves, our plugin grows with you, seamlessly accommodating increased subscription volumes, expanding product catalogs, and evolving customer needs. 23 - You can confidently scale your subscription offerings without worrying about technical limitations or disruptions. 24 - [Subscriptions for Woo](https://wp-subscriptions.com/) allow business and casual sellers to accept reliable recurring payments on a fixed billing schedule (buyers may require a PayPal account). 25 - It’s easy for shoppers, simple for you, and great for your business! 26 27 = Subscriptions for Woo Features = 28 - Unlimited downloads 29 - Unlimited domains 30 - PayPal subscription plan chosen on WooCommerce product 31 32 = Subscriptions for Woo Premium Features = 33 Everything from above plus the following: 34 - Allow specific users to edit plugin settings and permissions 35 - Allow specific users to view and manage subscribers 36 - Allow specific users to edit subscription products 37 - Give subscribers the ability to manage their own plan, including pausing, cancelling, or re-activating, without needing to wait on you for help 38 - Create virtual and downloadable subscription products 39 40 = Subscriptions for Woo Enterprise Features = 41 Everything from above plus the following: 42 - Create custom roles to restrict content based on customer subscription(s) 43 - Shortcode allows adding PayPal subscribe button to any page 44 - Allow canceled subscribers to resubscribe and receive a discount 45 - Easily generate WooCommerce products from each plan with one click 46 - Enterprise support 47 48 [Compare plans at https://wp-subscriptions.com/compare-plans/](https://wp-subscriptions.com/compare-plans/) 33 49 34 50 = Activate PayPal = … … 105 121 106 122 == Changelog == 123 124 = 2.5.4 = 125 * Bugfix: deleted products cause error on order template in admin area 126 * Improvemnet: add missing css identifier in js 127 * Improvemnet: add missing docblock 128 * Improvemnet: check for tab content before attempting to include in options page menu 129 * Improvemnet: add min and max to number type for options page 130 * Improvemnet: move localize script for paypal button to paypal class 107 131 108 132 = 2.5.3 = -
subscriptions-for-woo/trunk/subscriptions-for-woo.php
r3261715 r3270659 11 11 * License: GPLv2 or later 12 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 13 * Version: 2.5. 313 * Version: 2.5.4 14 14 * WC requires at least: 8.6.0 15 15 * WC tested up to: 9.7.1 -
subscriptions-for-woo/trunk/templates/tab-content/go-pro.php
r3258064 r3270659 13 13 <li>Give subscribers the ability to manage their own plan, including pausing, cancelling, or re-activating, without needing to wait on you for help</li> 14 14 <li>Create virtual and downloadable subscription products</li> 15 <li><span class="pro-name">Enterprise feature:</span> Create custom roles to restrict content based on customer subscription(s)</li> 15 16 <li><span class="pro-name">Enterprise feature:</span> Shortcode, with copy shortcode link, allows adding PayPal subscribe button to any page</li> 16 17 <li><span class="pro-name">Enterprise feature:</span> Allow canceled subscribers to resubscribe and receive a discount</li> 18 <li><span class="pro-name">Enterprise feature:</span> Easily generate WooCommerce products from each plan with one click</li> 17 19 <li><span class="pro-name">Enterprise feature:</span> Priority enterprise support</li> 18 20 </ul> -
subscriptions-for-woo/trunk/templates/tab-content/tab-general.php
r3259422 r3270659 148 148 $value = esc_attr($value); 149 149 150 echo "<input size='2' type='number' min='1' max='100' id='".esc_attr($option)."' name='".esc_attr($name)."' value='".esc_attr($value)."' ".esc_attr($disabled).' />'; 150 $min = $array['min'] ?? 1; 151 152 $max = $array['max'] ?? 100; 153 154 echo "<input size='2' type='number' min='".esc_attr($min)."' max='".esc_attr($max)."' id='".esc_attr($option)."' name='".esc_attr($name)."' value='".esc_attr($value)."' ".esc_attr($disabled).' />'; 151 155 152 156 break;
Note: See TracChangeset
for help on using the changeset viewer.