Changeset 3156863
- Timestamp:
- 09/24/2024 11:27:13 AM (16 months ago)
- Location:
- woo-subscription-trial-coupon
- Files:
-
- 44 added
- 4 deleted
- 6 edited
- 1 copied
-
tags/2.0.0 (copied) (copied from woo-subscription-trial-coupon/trunk)
-
tags/2.0.0/Classes (added)
-
tags/2.0.0/Classes/Admin (added)
-
tags/2.0.0/Classes/Admin/Activator.php (added)
-
tags/2.0.0/Classes/Admin/AdminNotice.php (added)
-
tags/2.0.0/Classes/Admin/Deactivator.php (added)
-
tags/2.0.0/Classes/Admin/TrialCoupon.php (added)
-
tags/2.0.0/Classes/FrontEnd (added)
-
tags/2.0.0/Classes/FrontEnd/RedeemCoupon.php (added)
-
tags/2.0.0/assets/css (deleted)
-
tags/2.0.0/assets/js/meta-boxes-coupon.js (modified) (3 diffs)
-
tags/2.0.0/composer.json (added)
-
tags/2.0.0/i18n (added)
-
tags/2.0.0/i18n/languages (added)
-
tags/2.0.0/i18n/languages/WooSubscriptionTrialCoupon.pot (added)
-
tags/2.0.0/inc (deleted)
-
tags/2.0.0/readme.txt (modified) (3 diffs)
-
tags/2.0.0/vendor (added)
-
tags/2.0.0/vendor/autoload.php (added)
-
tags/2.0.0/vendor/composer (added)
-
tags/2.0.0/vendor/composer/ClassLoader.php (added)
-
tags/2.0.0/vendor/composer/LICENSE (added)
-
tags/2.0.0/vendor/composer/autoload_classmap.php (added)
-
tags/2.0.0/vendor/composer/autoload_namespaces.php (added)
-
tags/2.0.0/vendor/composer/autoload_psr4.php (added)
-
tags/2.0.0/vendor/composer/autoload_real.php (added)
-
tags/2.0.0/vendor/composer/autoload_static.php (added)
-
tags/2.0.0/woo-subscription-trial-coupon.php (modified) (7 diffs)
-
trunk/Classes (added)
-
trunk/Classes/Admin (added)
-
trunk/Classes/Admin/Activator.php (added)
-
trunk/Classes/Admin/AdminNotice.php (added)
-
trunk/Classes/Admin/Deactivator.php (added)
-
trunk/Classes/Admin/TrialCoupon.php (added)
-
trunk/Classes/FrontEnd (added)
-
trunk/Classes/FrontEnd/RedeemCoupon.php (added)
-
trunk/assets/css (deleted)
-
trunk/assets/js/meta-boxes-coupon.js (modified) (3 diffs)
-
trunk/composer.json (added)
-
trunk/i18n (added)
-
trunk/i18n/languages (added)
-
trunk/i18n/languages/WooSubscriptionTrialCoupon.pot (added)
-
trunk/inc (deleted)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/vendor (added)
-
trunk/vendor/autoload.php (added)
-
trunk/vendor/composer (added)
-
trunk/vendor/composer/ClassLoader.php (added)
-
trunk/vendor/composer/LICENSE (added)
-
trunk/vendor/composer/autoload_classmap.php (added)
-
trunk/vendor/composer/autoload_namespaces.php (added)
-
trunk/vendor/composer/autoload_psr4.php (added)
-
trunk/vendor/composer/autoload_real.php (added)
-
trunk/vendor/composer/autoload_static.php (added)
-
trunk/woo-subscription-trial-coupon.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-subscription-trial-coupon/tags/2.0.0/assets/js/meta-boxes-coupon.js
r2180006 r3156863 3 3 4 4 var renewals_field = document.querySelector( '.subscription_coupon_trial_length_field' ), 5 $renewals_field = $( renewals_field ); 5 $renewals_field = $( renewals_field ), 6 coupon_amount_field = document.querySelector( '.coupon_amount_field' ), 7 $coupon_amount_field = $( coupon_amount_field ); 6 8 7 9 /** … … 30 32 switch ( select_val ) { 31 33 case 'subscription_trial': 32 case 'recurring_fee': 33 case 'recurring_percent': 34 $renewals_field.show(); 35 $coupon_amount_field.hide(); // Hide the coupon amount field for subscription trial 36 break; 37 38 //case 'recurring_fee': 39 //case 'recurring_percent': 34 40 case 'sign_up_fee': 35 41 case 'sign_up_fee_percent': 36 42 $renewals_field.show(); 43 $coupon_amount_field.show(); // Show the coupon amount field for other types 37 44 break; 38 45 39 46 default: 40 47 $renewals_field.hide(); 48 $coupon_amount_field.show(); // Show the coupon amount field by default 41 49 break; 42 50 } … … 55 63 56 64 wcs_meta_boxes_coupon_actions.init(); 57 } );65 }); -
woo-subscription-trial-coupon/tags/2.0.0/readme.txt
r3116883 r3156863 2 2 Contributors: Md. Jahidul Islam 3 3 Tags: Woocommerce Subscription Trial Coupon, Trial Coupon, Free Trial Coupon, Woocommerce subscription Free trial Coupon, Extends Free trial 4 Requires at least: 5. 05 Tested up to: 6. 5.56 Stable tag: 1.0.14 Requires at least: 5.9 5 Tested up to: 6.6.2 6 Stable tag: 2.0.0 7 7 Requires PHP: 7.0.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Free Trial Coupon for WooCommerce Subscriptions" adds a new coupon type to extend the default trial period for subscription products. 11 "Free Trial Coupon for Woocommerce Subscriptions" will add coupon type & option in Woocommerce coupon filed to extend the default trial period of Woocommerce subscription products 12 12 13 13 == Description == 14 14 15 **Free Trial Coupon for Woocommerce Subscriptions** will add coupon type & option in Woocommerce coupon filed to extend the default trial period. This plugin will work with only if you have to activate Woocommerce & Woocomerce Subscription enabled 15 **Free Trial Coupon for WooCommerce Subscriptions adds a new coupon type that allows you to extend the default trial period for subscription products. This is ideal for businesses looking to offer extended free trials to attract new subscribers. The coupon can be applied during the sign-up process, giving customers more time to evaluate your product or service before committing. 16 17 Please note that this plugin does not support renewal discounts for subscriptions in the latest version. 18 19 To use this plugin, you must have both WooCommerce and WooCommerce Subscriptions installed and activated. 16 20 17 21 > Requires Plugins: 18 > 1. [**Woocommerce **](https://wordpress.org/plugins/woocommerce/)19 > 2. [**Woocommerce Subscriptions **](https://woocommerce.com/products/woocommerce-subscriptions/)22 > 1. [**Woocommerce 6.5 or greater **](https://wordpress.org/plugins/woocommerce/) 23 > 2. [**Woocommerce Subscriptions 6.7 or greater **](https://woocommerce.com/products/woocommerce-subscriptions/) 20 24 21 25 22 > Features: 23 > 1. Add new coupon type "Subscription Trial" 24 > 2. Work with woocommerce subscriptions products 25 > 3. Work with coupon type Sign Up Fee Discount 26 > 4. Work with coupon type Sign Up Fee % Discount 27 > 5. Work with coupon type Recurring Product Discount 28 > 6. Work with coupon type Recurring Product % Discount 26 = Features = 27 28 1. *Add new coupon type: "Subscription Trial* 29 Create and manage a special coupon type that provides free trial periods for subscription products. 30 31 2. *Supports WooCommerce Subscription Products* 32 Seamless integration with WooCommerce Subscriptions, allowing the coupon to be applied to subscription-based products. 33 34 3. *Supports Sign-Up Fee Discount* 35 Apply fixed-amount discounts on the initial sign-up fee for WooCommerce subscriptions. 36 37 29 38 30 39 … … 49 58 == Frequently Asked Questions == 50 59 51 = Does it work s without Woocommerce plugin? =60 = Does it work without the WooCommerce plugin? = 52 61 53 No, it doesn't work without Woocommerce plugin.62 No, this plugin requires WooCommerce to be installed and activated in order to function. 54 63 55 = Does it work s without Woocommerce Subscriptionplugin? =64 = Does it work without the WooCommerce Subscriptions plugin? = 56 65 57 No, it doesn't work without Woocommerce plugin.66 No, this plugin requires both WooCommerce and WooCommerce Subscriptions to be installed and activated. 58 67 59 = Does it works with woocommerce subscriptions coupon types? =68 = Does it support WooCommerce Subscriptions coupon types? = 60 69 61 Yes, it will work with woocomerce subscription default coupon types. 70 Yes, the plugin works with WooCommerce Subscriptions and supports default coupon types such as "Sign-Up Fee" and "Sign-Up Fee Percentage" discounts. However, the plugin does not support renewal discounts in the latest version. 71 72 = Can I use this plugin to extend the trial period for subscriptions? = 73 74 Yes, the main feature of this plugin is to add a new coupon type that allows you to extend the trial period for subscription products, providing flexibility in offering free trials to potential customers. 62 75 63 76 64 77 == Screenshots == 65 78 66 1. Go to Wordpress dashboard>woocommerce> coupon79 1. Go to Wordpress dashboard>woocommerce>Marketing>Coupons 67 80 2. Create new coupon 68 81 3. Select coupon type "Subscription Trial" … … 72 85 73 86 == Changelog == 87 = 2.0.0 - September 24, 2024 = 88 - Refactored codebase to Object-Oriented Programming (OOP) style for better maintainability and scalability. 89 - Restructured plugin files to follow modern WordPress standards, improving organization and clarity. 90 - Added full WordPress localization support, enabling translation into multiple languages. 91 - Improved security with proper escaping and sanitization throughout the plugin to prevent vulnerabilities. 92 - Enhanced language support, including text domain setup for easier translation and integration with WordPress language packs. 93 - Introduced support for WordPress Plugin Dependencies, ensuring required plugins are automatically detected and prompted for installation. 94 - Optimized performance with better handling of coupon-related actions and WooCommerce integrations. 95 = 1.0.1 - Octobor 26, 2019 = 96 - Improve code 74 97 = 1.0.0 - Octobor 25, 2019 = 75 98 - initial release 76 = 1.0.1 - Octobor 26, 2019 = 77 - Improve code 99 -
woo-subscription-trial-coupon/tags/2.0.0/woo-subscription-trial-coupon.php
r2180573 r3156863 6 6 Author: Jahid 7 7 Author URI: https://jahid.co 8 Version: 1.0.1 8 Version: 2.0.0 9 Requires Plugins: woocommerce, woocommerce-subscriptions 9 10 License: GPLv2 or later 10 11 Tags: Woocommerce Subscription Trial Coupon, Trial Coupon, Free Trial Coupon, Woocommerce subscription Free trial Coupon, Extends Free trial … … 37 38 } 38 39 40 // Include the Composer autoloader 41 require_once __DIR__ . '/vendor/autoload.php'; 42 43 44 use CoderPlus\WooSubscriptionTrialCoupon\Admin\Activator; 45 use CoderPlus\WooSubscriptionTrialCoupon\Admin\AdminNotice; 46 use CoderPlus\WooSubscriptionTrialCoupon\Admin\Deactivator; 47 use CoderPlus\WooSubscriptionTrialCoupon\Admin\TrialCoupon; 48 use CoderPlus\WooSubscriptionTrialCoupon\FrontEnd\RedeemCoupon; 49 50 39 51 /** 40 52 * Currently plugin version. … … 42 54 * Rename this for your plugin and update it as you release new versions. 43 55 */ 44 define( 'WCSC_VERSION', ' 1.0.1' );56 define( 'WCSC_VERSION', '2.0.0' ); 45 57 46 58 define('WCSC_PLUGIN_URL', plugin_dir_url(__FILE__)); 59 60 47 61 48 62 /** … … 51 65 */ 52 66 function activate_wcsc_trial_coupon() { 53 require_once plugin_dir_path( __FILE__ ) . 'inc/class-wcsc-activator.php'; 54 WCSC_Activator::activate(); 67 Activator::activate(); 55 68 } 56 69 … … 60 73 */ 61 74 function deactivate_wcsc_trial_coupon() { 62 require_once plugin_dir_path( __FILE__ ) . 'inc/class-wcsc-deactivator.php'; 63 WCSC_Deactivator::deactivate(); 75 Deactivator::deactivate(); 64 76 } 65 77 … … 71 83 * admin-specific hooks, and public-facing site hooks. 72 84 */ 73 require plugin_dir_path( __FILE__). 'inc/class-wcsc-trial-coupon.php'; 74 require_once plugin_dir_path( __FILE__). 'inc/class-WCSC-admin-notice.php'; 85 75 86 76 87 /** … … 86 97 if ( in_array( 'woocommerce-subscriptions/woocommerce-subscriptions.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { 87 98 88 $WCSC = new WCSC_Trial_Coupon(); 89 $WCSC->init(); 99 $WooSubscriptionTrialCouponTC = new TrialCoupon(); 100 $WooSubscriptionTrialCouponRC = new RedeemCoupon(); 101 $WooSubscriptionTrialCouponTC->init(); 102 $WooSubscriptionTrialCouponRC->init(); 90 103 91 104 }else{ 92 105 93 add_action( 'admin_notices', 'WCSC_Admin_Notice::check_requre_plugin');106 add_action('admin_notices', [AdminNotice::class, 'check_requre_plugin']); 94 107 } 95 -
woo-subscription-trial-coupon/trunk/assets/js/meta-boxes-coupon.js
r2180006 r3156863 3 3 4 4 var renewals_field = document.querySelector( '.subscription_coupon_trial_length_field' ), 5 $renewals_field = $( renewals_field ); 5 $renewals_field = $( renewals_field ), 6 coupon_amount_field = document.querySelector( '.coupon_amount_field' ), 7 $coupon_amount_field = $( coupon_amount_field ); 6 8 7 9 /** … … 30 32 switch ( select_val ) { 31 33 case 'subscription_trial': 32 case 'recurring_fee': 33 case 'recurring_percent': 34 $renewals_field.show(); 35 $coupon_amount_field.hide(); // Hide the coupon amount field for subscription trial 36 break; 37 38 //case 'recurring_fee': 39 //case 'recurring_percent': 34 40 case 'sign_up_fee': 35 41 case 'sign_up_fee_percent': 36 42 $renewals_field.show(); 43 $coupon_amount_field.show(); // Show the coupon amount field for other types 37 44 break; 38 45 39 46 default: 40 47 $renewals_field.hide(); 48 $coupon_amount_field.show(); // Show the coupon amount field by default 41 49 break; 42 50 } … … 55 63 56 64 wcs_meta_boxes_coupon_actions.init(); 57 } );65 }); -
woo-subscription-trial-coupon/trunk/readme.txt
r3116883 r3156863 2 2 Contributors: Md. Jahidul Islam 3 3 Tags: Woocommerce Subscription Trial Coupon, Trial Coupon, Free Trial Coupon, Woocommerce subscription Free trial Coupon, Extends Free trial 4 Requires at least: 5. 05 Tested up to: 6. 5.56 Stable tag: 1.0.14 Requires at least: 5.9 5 Tested up to: 6.6.2 6 Stable tag: 2.0.0 7 7 Requires PHP: 7.0.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Free Trial Coupon for WooCommerce Subscriptions" adds a new coupon type to extend the default trial period for subscription products. 11 "Free Trial Coupon for Woocommerce Subscriptions" will add coupon type & option in Woocommerce coupon filed to extend the default trial period of Woocommerce subscription products 12 12 13 13 == Description == 14 14 15 **Free Trial Coupon for Woocommerce Subscriptions** will add coupon type & option in Woocommerce coupon filed to extend the default trial period. This plugin will work with only if you have to activate Woocommerce & Woocomerce Subscription enabled 15 **Free Trial Coupon for WooCommerce Subscriptions adds a new coupon type that allows you to extend the default trial period for subscription products. This is ideal for businesses looking to offer extended free trials to attract new subscribers. The coupon can be applied during the sign-up process, giving customers more time to evaluate your product or service before committing. 16 17 Please note that this plugin does not support renewal discounts for subscriptions in the latest version. 18 19 To use this plugin, you must have both WooCommerce and WooCommerce Subscriptions installed and activated. 16 20 17 21 > Requires Plugins: 18 > 1. [**Woocommerce **](https://wordpress.org/plugins/woocommerce/)19 > 2. [**Woocommerce Subscriptions **](https://woocommerce.com/products/woocommerce-subscriptions/)22 > 1. [**Woocommerce 6.5 or greater **](https://wordpress.org/plugins/woocommerce/) 23 > 2. [**Woocommerce Subscriptions 6.7 or greater **](https://woocommerce.com/products/woocommerce-subscriptions/) 20 24 21 25 22 > Features: 23 > 1. Add new coupon type "Subscription Trial" 24 > 2. Work with woocommerce subscriptions products 25 > 3. Work with coupon type Sign Up Fee Discount 26 > 4. Work with coupon type Sign Up Fee % Discount 27 > 5. Work with coupon type Recurring Product Discount 28 > 6. Work with coupon type Recurring Product % Discount 26 = Features = 27 28 1. *Add new coupon type: "Subscription Trial* 29 Create and manage a special coupon type that provides free trial periods for subscription products. 30 31 2. *Supports WooCommerce Subscription Products* 32 Seamless integration with WooCommerce Subscriptions, allowing the coupon to be applied to subscription-based products. 33 34 3. *Supports Sign-Up Fee Discount* 35 Apply fixed-amount discounts on the initial sign-up fee for WooCommerce subscriptions. 36 37 29 38 30 39 … … 49 58 == Frequently Asked Questions == 50 59 51 = Does it work s without Woocommerce plugin? =60 = Does it work without the WooCommerce plugin? = 52 61 53 No, it doesn't work without Woocommerce plugin.62 No, this plugin requires WooCommerce to be installed and activated in order to function. 54 63 55 = Does it work s without Woocommerce Subscriptionplugin? =64 = Does it work without the WooCommerce Subscriptions plugin? = 56 65 57 No, it doesn't work without Woocommerce plugin.66 No, this plugin requires both WooCommerce and WooCommerce Subscriptions to be installed and activated. 58 67 59 = Does it works with woocommerce subscriptions coupon types? =68 = Does it support WooCommerce Subscriptions coupon types? = 60 69 61 Yes, it will work with woocomerce subscription default coupon types. 70 Yes, the plugin works with WooCommerce Subscriptions and supports default coupon types such as "Sign-Up Fee" and "Sign-Up Fee Percentage" discounts. However, the plugin does not support renewal discounts in the latest version. 71 72 = Can I use this plugin to extend the trial period for subscriptions? = 73 74 Yes, the main feature of this plugin is to add a new coupon type that allows you to extend the trial period for subscription products, providing flexibility in offering free trials to potential customers. 62 75 63 76 64 77 == Screenshots == 65 78 66 1. Go to Wordpress dashboard>woocommerce> coupon79 1. Go to Wordpress dashboard>woocommerce>Marketing>Coupons 67 80 2. Create new coupon 68 81 3. Select coupon type "Subscription Trial" … … 72 85 73 86 == Changelog == 87 = 2.0.0 - September 24, 2024 = 88 - Refactored codebase to Object-Oriented Programming (OOP) style for better maintainability and scalability. 89 - Restructured plugin files to follow modern WordPress standards, improving organization and clarity. 90 - Added full WordPress localization support, enabling translation into multiple languages. 91 - Improved security with proper escaping and sanitization throughout the plugin to prevent vulnerabilities. 92 - Enhanced language support, including text domain setup for easier translation and integration with WordPress language packs. 93 - Introduced support for WordPress Plugin Dependencies, ensuring required plugins are automatically detected and prompted for installation. 94 - Optimized performance with better handling of coupon-related actions and WooCommerce integrations. 95 = 1.0.1 - Octobor 26, 2019 = 96 - Improve code 74 97 = 1.0.0 - Octobor 25, 2019 = 75 98 - initial release 76 = 1.0.1 - Octobor 26, 2019 = 77 - Improve code 99 -
woo-subscription-trial-coupon/trunk/woo-subscription-trial-coupon.php
r2180573 r3156863 6 6 Author: Jahid 7 7 Author URI: https://jahid.co 8 Version: 1.0.1 8 Version: 2.0.0 9 Requires Plugins: woocommerce, woocommerce-subscriptions 9 10 License: GPLv2 or later 10 11 Tags: Woocommerce Subscription Trial Coupon, Trial Coupon, Free Trial Coupon, Woocommerce subscription Free trial Coupon, Extends Free trial … … 37 38 } 38 39 40 // Include the Composer autoloader 41 require_once __DIR__ . '/vendor/autoload.php'; 42 43 44 use CoderPlus\WooSubscriptionTrialCoupon\Admin\Activator; 45 use CoderPlus\WooSubscriptionTrialCoupon\Admin\AdminNotice; 46 use CoderPlus\WooSubscriptionTrialCoupon\Admin\Deactivator; 47 use CoderPlus\WooSubscriptionTrialCoupon\Admin\TrialCoupon; 48 use CoderPlus\WooSubscriptionTrialCoupon\FrontEnd\RedeemCoupon; 49 50 39 51 /** 40 52 * Currently plugin version. … … 42 54 * Rename this for your plugin and update it as you release new versions. 43 55 */ 44 define( 'WCSC_VERSION', ' 1.0.1' );56 define( 'WCSC_VERSION', '2.0.0' ); 45 57 46 58 define('WCSC_PLUGIN_URL', plugin_dir_url(__FILE__)); 59 60 47 61 48 62 /** … … 51 65 */ 52 66 function activate_wcsc_trial_coupon() { 53 require_once plugin_dir_path( __FILE__ ) . 'inc/class-wcsc-activator.php'; 54 WCSC_Activator::activate(); 67 Activator::activate(); 55 68 } 56 69 … … 60 73 */ 61 74 function deactivate_wcsc_trial_coupon() { 62 require_once plugin_dir_path( __FILE__ ) . 'inc/class-wcsc-deactivator.php'; 63 WCSC_Deactivator::deactivate(); 75 Deactivator::deactivate(); 64 76 } 65 77 … … 71 83 * admin-specific hooks, and public-facing site hooks. 72 84 */ 73 require plugin_dir_path( __FILE__). 'inc/class-wcsc-trial-coupon.php'; 74 require_once plugin_dir_path( __FILE__). 'inc/class-WCSC-admin-notice.php'; 85 75 86 76 87 /** … … 86 97 if ( in_array( 'woocommerce-subscriptions/woocommerce-subscriptions.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { 87 98 88 $WCSC = new WCSC_Trial_Coupon(); 89 $WCSC->init(); 99 $WooSubscriptionTrialCouponTC = new TrialCoupon(); 100 $WooSubscriptionTrialCouponRC = new RedeemCoupon(); 101 $WooSubscriptionTrialCouponTC->init(); 102 $WooSubscriptionTrialCouponRC->init(); 90 103 91 104 }else{ 92 105 93 add_action( 'admin_notices', 'WCSC_Admin_Notice::check_requre_plugin');106 add_action('admin_notices', [AdminNotice::class, 'check_requre_plugin']); 94 107 } 95
Note: See TracChangeset
for help on using the changeset viewer.