Plugin Directory

Changeset 3156863


Ignore:
Timestamp:
09/24/2024 11:27:13 AM (16 months ago)
Author:
Md. Jahidul Islam
Message:

Release version 2.0.0

Location:
woo-subscription-trial-coupon
Files:
44 added
4 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • woo-subscription-trial-coupon/tags/2.0.0/assets/js/meta-boxes-coupon.js

    r2180006 r3156863  
    33
    44    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 );
    68
    79    /**
     
    3032            switch ( select_val ) {
    3133                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':
    3440                case 'sign_up_fee':
    3541                case 'sign_up_fee_percent':
    3642                    $renewals_field.show();
     43                    $coupon_amount_field.show();  // Show the coupon amount field for other types
    3744                    break;
    3845
    3946                default:
    4047                    $renewals_field.hide();
     48                    $coupon_amount_field.show();  // Show the coupon amount field by default
    4149                    break;
    4250            }
     
    5563
    5664    wcs_meta_boxes_coupon_actions.init();
    57 } );
     65});
  • woo-subscription-trial-coupon/tags/2.0.0/readme.txt

    r3116883 r3156863  
    22Contributors: Md. Jahidul Islam
    33Tags: Woocommerce Subscription Trial Coupon, Trial Coupon, Free Trial Coupon, Woocommerce subscription Free trial Coupon, Extends Free trial
    4 Requires at least: 5.0
    5 Tested up to: 6.5.5
    6 Stable tag: 1.0.1
     4Requires at least: 5.9
     5Tested up to: 6.6.2
     6Stable tag: 2.0.0
    77Requires PHP: 7.0.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    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
    1212
    1313== Description ==
    1414
    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
     17Please note that this plugin does not support renewal discounts for subscriptions in the latest version.
     18
     19To use this plugin, you must have both WooCommerce and WooCommerce Subscriptions installed and activated.
    1620
    1721> 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/)
    2024
    2125
    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
     281. *Add new coupon type: "Subscription Trial* 
     29   Create and manage a special coupon type that provides free trial periods for subscription products.
     30
     312. *Supports WooCommerce Subscription Products* 
     32   Seamless integration with WooCommerce Subscriptions, allowing the coupon to be applied to subscription-based products.
     33
     343. *Supports Sign-Up Fee Discount* 
     35   Apply fixed-amount discounts on the initial sign-up fee for WooCommerce subscriptions.
     36
     37
    2938
    3039
     
    4958== Frequently Asked Questions ==
    5059
    51 = Does it works without Woocommerce plugin? =
     60= Does it work without the WooCommerce plugin? =
    5261
    53 No, it doesn't work without Woocommerce plugin.
     62No, this plugin requires WooCommerce to be installed and activated in order to function.
    5463
    55 = Does it works without Woocommerce Subscription plugin? =
     64= Does it work without the WooCommerce Subscriptions plugin? =
    5665
    57 No, it doesn't work without Woocommerce plugin.
     66No, this plugin requires both WooCommerce and WooCommerce Subscriptions to be installed and activated.
    5867
    59 = Does it works with woocommerce subscriptions coupon types? =
     68= Does it support WooCommerce Subscriptions coupon types? =
    6069
    61 Yes, it will work with woocomerce subscription default coupon types.
     70Yes, 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
     74Yes, 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.
    6275
    6376
    6477== Screenshots ==
    6578
    66 1. Go to Wordpress dashboard>woocommerce>coupon
     791. Go to Wordpress dashboard>woocommerce>Marketing>Coupons
    67802. Create new coupon
    68813. Select coupon type "Subscription Trial"
     
    7285
    7386== 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
    7497= 1.0.0 - Octobor 25, 2019 =
    7598- 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  
    66Author: Jahid
    77Author URI: https://jahid.co
    8 Version: 1.0.1
     8Version: 2.0.0
     9Requires Plugins: woocommerce, woocommerce-subscriptions
    910License: GPLv2 or later
    1011Tags: Woocommerce Subscription Trial Coupon, Trial Coupon, Free Trial Coupon, Woocommerce subscription Free trial Coupon, Extends Free trial
     
    3738}
    3839
     40// Include the Composer autoloader
     41require_once __DIR__ . '/vendor/autoload.php';
     42
     43
     44use CoderPlus\WooSubscriptionTrialCoupon\Admin\Activator;
     45use CoderPlus\WooSubscriptionTrialCoupon\Admin\AdminNotice;
     46use CoderPlus\WooSubscriptionTrialCoupon\Admin\Deactivator;
     47use CoderPlus\WooSubscriptionTrialCoupon\Admin\TrialCoupon;
     48use CoderPlus\WooSubscriptionTrialCoupon\FrontEnd\RedeemCoupon;
     49
     50
    3951/**
    4052 * Currently plugin version.
     
    4254 * Rename this for your plugin and update it as you release new versions.
    4355 */
    44 define( 'WCSC_VERSION', '1.0.1' );
     56define( 'WCSC_VERSION', '2.0.0' );
    4557
    4658define('WCSC_PLUGIN_URL', plugin_dir_url(__FILE__));
     59
     60
    4761
    4862/**
     
    5165 */
    5266function activate_wcsc_trial_coupon() {
    53     require_once plugin_dir_path( __FILE__ ) . 'inc/class-wcsc-activator.php';
    54     WCSC_Activator::activate();
     67    Activator::activate();
    5568}
    5669
     
    6073 */
    6174function deactivate_wcsc_trial_coupon() {
    62     require_once plugin_dir_path( __FILE__ ) . 'inc/class-wcsc-deactivator.php';
    63     WCSC_Deactivator::deactivate();
     75    Deactivator::deactivate();
    6476}
    6577
     
    7183 * admin-specific hooks, and public-facing site hooks.
    7284 */
    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
    7586
    7687/**
     
    8697if ( 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' ) ) ) ) {   
    8798   
    88     $WCSC = new WCSC_Trial_Coupon();
    89     $WCSC->init();
     99    $WooSubscriptionTrialCouponTC = new TrialCoupon();
     100    $WooSubscriptionTrialCouponRC = new RedeemCoupon();
     101    $WooSubscriptionTrialCouponTC->init();
     102    $WooSubscriptionTrialCouponRC->init();
    90103
    91104}else{   
    92105
    93     add_action( 'admin_notices', 'WCSC_Admin_Notice::check_requre_plugin');
     106    add_action('admin_notices', [AdminNotice::class, 'check_requre_plugin']);
    94107}
    95 
  • woo-subscription-trial-coupon/trunk/assets/js/meta-boxes-coupon.js

    r2180006 r3156863  
    33
    44    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 );
    68
    79    /**
     
    3032            switch ( select_val ) {
    3133                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':
    3440                case 'sign_up_fee':
    3541                case 'sign_up_fee_percent':
    3642                    $renewals_field.show();
     43                    $coupon_amount_field.show();  // Show the coupon amount field for other types
    3744                    break;
    3845
    3946                default:
    4047                    $renewals_field.hide();
     48                    $coupon_amount_field.show();  // Show the coupon amount field by default
    4149                    break;
    4250            }
     
    5563
    5664    wcs_meta_boxes_coupon_actions.init();
    57 } );
     65});
  • woo-subscription-trial-coupon/trunk/readme.txt

    r3116883 r3156863  
    22Contributors: Md. Jahidul Islam
    33Tags: Woocommerce Subscription Trial Coupon, Trial Coupon, Free Trial Coupon, Woocommerce subscription Free trial Coupon, Extends Free trial
    4 Requires at least: 5.0
    5 Tested up to: 6.5.5
    6 Stable tag: 1.0.1
     4Requires at least: 5.9
     5Tested up to: 6.6.2
     6Stable tag: 2.0.0
    77Requires PHP: 7.0.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    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
    1212
    1313== Description ==
    1414
    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
     17Please note that this plugin does not support renewal discounts for subscriptions in the latest version.
     18
     19To use this plugin, you must have both WooCommerce and WooCommerce Subscriptions installed and activated.
    1620
    1721> 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/)
    2024
    2125
    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
     281. *Add new coupon type: "Subscription Trial* 
     29   Create and manage a special coupon type that provides free trial periods for subscription products.
     30
     312. *Supports WooCommerce Subscription Products* 
     32   Seamless integration with WooCommerce Subscriptions, allowing the coupon to be applied to subscription-based products.
     33
     343. *Supports Sign-Up Fee Discount* 
     35   Apply fixed-amount discounts on the initial sign-up fee for WooCommerce subscriptions.
     36
     37
    2938
    3039
     
    4958== Frequently Asked Questions ==
    5059
    51 = Does it works without Woocommerce plugin? =
     60= Does it work without the WooCommerce plugin? =
    5261
    53 No, it doesn't work without Woocommerce plugin.
     62No, this plugin requires WooCommerce to be installed and activated in order to function.
    5463
    55 = Does it works without Woocommerce Subscription plugin? =
     64= Does it work without the WooCommerce Subscriptions plugin? =
    5665
    57 No, it doesn't work without Woocommerce plugin.
     66No, this plugin requires both WooCommerce and WooCommerce Subscriptions to be installed and activated.
    5867
    59 = Does it works with woocommerce subscriptions coupon types? =
     68= Does it support WooCommerce Subscriptions coupon types? =
    6069
    61 Yes, it will work with woocomerce subscription default coupon types.
     70Yes, 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
     74Yes, 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.
    6275
    6376
    6477== Screenshots ==
    6578
    66 1. Go to Wordpress dashboard>woocommerce>coupon
     791. Go to Wordpress dashboard>woocommerce>Marketing>Coupons
    67802. Create new coupon
    68813. Select coupon type "Subscription Trial"
     
    7285
    7386== 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
    7497= 1.0.0 - Octobor 25, 2019 =
    7598- 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  
    66Author: Jahid
    77Author URI: https://jahid.co
    8 Version: 1.0.1
     8Version: 2.0.0
     9Requires Plugins: woocommerce, woocommerce-subscriptions
    910License: GPLv2 or later
    1011Tags: Woocommerce Subscription Trial Coupon, Trial Coupon, Free Trial Coupon, Woocommerce subscription Free trial Coupon, Extends Free trial
     
    3738}
    3839
     40// Include the Composer autoloader
     41require_once __DIR__ . '/vendor/autoload.php';
     42
     43
     44use CoderPlus\WooSubscriptionTrialCoupon\Admin\Activator;
     45use CoderPlus\WooSubscriptionTrialCoupon\Admin\AdminNotice;
     46use CoderPlus\WooSubscriptionTrialCoupon\Admin\Deactivator;
     47use CoderPlus\WooSubscriptionTrialCoupon\Admin\TrialCoupon;
     48use CoderPlus\WooSubscriptionTrialCoupon\FrontEnd\RedeemCoupon;
     49
     50
    3951/**
    4052 * Currently plugin version.
     
    4254 * Rename this for your plugin and update it as you release new versions.
    4355 */
    44 define( 'WCSC_VERSION', '1.0.1' );
     56define( 'WCSC_VERSION', '2.0.0' );
    4557
    4658define('WCSC_PLUGIN_URL', plugin_dir_url(__FILE__));
     59
     60
    4761
    4862/**
     
    5165 */
    5266function activate_wcsc_trial_coupon() {
    53     require_once plugin_dir_path( __FILE__ ) . 'inc/class-wcsc-activator.php';
    54     WCSC_Activator::activate();
     67    Activator::activate();
    5568}
    5669
     
    6073 */
    6174function deactivate_wcsc_trial_coupon() {
    62     require_once plugin_dir_path( __FILE__ ) . 'inc/class-wcsc-deactivator.php';
    63     WCSC_Deactivator::deactivate();
     75    Deactivator::deactivate();
    6476}
    6577
     
    7183 * admin-specific hooks, and public-facing site hooks.
    7284 */
    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
    7586
    7687/**
     
    8697if ( 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' ) ) ) ) {   
    8798   
    88     $WCSC = new WCSC_Trial_Coupon();
    89     $WCSC->init();
     99    $WooSubscriptionTrialCouponTC = new TrialCoupon();
     100    $WooSubscriptionTrialCouponRC = new RedeemCoupon();
     101    $WooSubscriptionTrialCouponTC->init();
     102    $WooSubscriptionTrialCouponRC->init();
    90103
    91104}else{   
    92105
    93     add_action( 'admin_notices', 'WCSC_Admin_Notice::check_requre_plugin');
     106    add_action('admin_notices', [AdminNotice::class, 'check_requre_plugin']);
    94107}
    95 
Note: See TracChangeset for help on using the changeset viewer.