Plugin Directory

Changeset 3045138


Ignore:
Timestamp:
03/04/2024 03:57:47 PM (2 years ago)
Author:
saulmorales
Message:

tagging version 4.0.2

Location:
subscription-epayco
Files:
5 edited
10 copied

Legend:

Unmodified
Added
Removed
  • subscription-epayco/tags/4.0.2/includes/class-gateway-subscription-epayco.php

    r3038799 r3045138  
    5050        add_action('woocommerce_scheduled_subscription_expiration', array($this, 'subscription_expiration'));
    5151        add_action('woocommerce_scheduled_subscription_payment', array($this, 'subscription_payment'), 20, 1);
     52        add_action('woocommerce_available_payment_gateways', array($this, 'disable_non_subscription'), 20);
    5253        add_action('woocommerce_api_'.strtolower(get_class($this)), array($this, 'confirmation_ipn'));
    5354    }
     
    196197    }
    197198
     199    public function disable_non_subscription($availableGateways)
     200    {
     201        $enable = WC_Subscriptions_Cart::cart_contains_subscription();
     202        if (!$enable && isset($availableGateways[$this->id])){
     203            unset($availableGateways[$this->id]);
     204        }
     205
     206        return $availableGateways;
     207    }
     208
    198209    public function confirmation_ipn(): void
    199210    {
  • subscription-epayco/tags/4.0.2/includes/class-subscription-epayco-plugin.php

    r3036939 r3045138  
    129129                'DNI' => __('Documento nacional de identificación')
    130130            )
    131         );                                                                                                                                                                                                                                                                     
     131        );
    132132
    133133        $fields['billing']['billing_dni'] = array(
  • subscription-epayco/tags/4.0.2/readme.txt

    r3038799 r3045138  
    66Tested up to: 6.4.3
    77Requires PHP: 8.0
    8 Stable tag: 4.0.1
     8Stable tag: 4.0.2
    99License: GNU General Public License v3.0
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    6161* Updated allow manually renew
    6262* Updated compatible with php >= 8.1
    63 = 4.0.0 =
     63= 4.0.1 =
    6464* Fixed fields billing_dni, billing_type_document
    6565* Fixed show errors messages
     66= 4.0.2 =
     67* Updated disable gateway if it is not subscription
    6668
    6769== Additional Info ==
  • subscription-epayco/tags/4.0.2/subscription-epayco.php

    r3038799 r3045138  
    33Plugin Name: Subscription ePayco
    44Description: Cobros periódicos, suscripciones de ePayco
    5 Version: 4.0.1
     5Version: 4.0.2
    66Author: Saul Morales Pacheco
    77Author URI: https://saulmoralespa.com
     
    1717
    1818if(!defined('SUBSCRIPTION_EPAYCO_SE_VERSION')){
    19     define('SUBSCRIPTION_EPAYCO_SE_VERSION', '4.0.1');
     19    define('SUBSCRIPTION_EPAYCO_SE_VERSION', '4.0.2');
    2020}
    2121
  • subscription-epayco/trunk/includes/class-gateway-subscription-epayco.php

    r3038799 r3045138  
    5050        add_action('woocommerce_scheduled_subscription_expiration', array($this, 'subscription_expiration'));
    5151        add_action('woocommerce_scheduled_subscription_payment', array($this, 'subscription_payment'), 20, 1);
     52        add_action('woocommerce_available_payment_gateways', array($this, 'disable_non_subscription'), 20);
    5253        add_action('woocommerce_api_'.strtolower(get_class($this)), array($this, 'confirmation_ipn'));
    5354    }
     
    196197    }
    197198
     199    public function disable_non_subscription($availableGateways)
     200    {
     201        $enable = WC_Subscriptions_Cart::cart_contains_subscription();
     202        if (!$enable && isset($availableGateways[$this->id])){
     203            unset($availableGateways[$this->id]);
     204        }
     205
     206        return $availableGateways;
     207    }
     208
    198209    public function confirmation_ipn(): void
    199210    {
  • subscription-epayco/trunk/includes/class-subscription-epayco-plugin.php

    r3036939 r3045138  
    129129                'DNI' => __('Documento nacional de identificación')
    130130            )
    131         );                                                                                                                                                                                                                                                                     
     131        );
    132132
    133133        $fields['billing']['billing_dni'] = array(
  • subscription-epayco/trunk/readme.txt

    r3038799 r3045138  
    66Tested up to: 6.4.3
    77Requires PHP: 8.0
    8 Stable tag: 4.0.1
     8Stable tag: 4.0.2
    99License: GNU General Public License v3.0
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    6161* Updated allow manually renew
    6262* Updated compatible with php >= 8.1
    63 = 4.0.0 =
     63= 4.0.1 =
    6464* Fixed fields billing_dni, billing_type_document
    6565* Fixed show errors messages
     66= 4.0.2 =
     67* Updated disable gateway if it is not subscription
    6668
    6769== Additional Info ==
  • subscription-epayco/trunk/subscription-epayco.php

    r3038799 r3045138  
    33Plugin Name: Subscription ePayco
    44Description: Cobros periódicos, suscripciones de ePayco
    5 Version: 4.0.1
     5Version: 4.0.2
    66Author: Saul Morales Pacheco
    77Author URI: https://saulmoralespa.com
     
    1717
    1818if(!defined('SUBSCRIPTION_EPAYCO_SE_VERSION')){
    19     define('SUBSCRIPTION_EPAYCO_SE_VERSION', '4.0.1');
     19    define('SUBSCRIPTION_EPAYCO_SE_VERSION', '4.0.2');
    2020}
    2121
Note: See TracChangeset for help on using the changeset viewer.