Plugin Directory

Changeset 2544064


Ignore:
Timestamp:
06/08/2021 06:28:20 AM (5 years ago)
Author:
idofri
Message:

new version-20210608

Location:
woo-pelecard-gateway/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • woo-pelecard-gateway/trunk/includes/Gateway.php

    r2523108 r2544064  
    182182        // Upay
    183183        add_filter( 'wpg/transaction/needs_validation', [ $this, 'validate_upay_transaction' ] );
     184
     185        // Disable payments transaction for subscription orders
     186        add_filter( 'wpg/checkout/min_payments', [ $this, 'disable_payments_for_subscription' ] );
     187        add_filter( 'wpg/checkout/max_payments', [ $this, 'disable_payments_for_subscription' ] );
    184188    }
    185189
     
    254258
    255259        return $needs_validation;
     260    }
     261
     262    /**
     263     * @param int $payments
     264     *
     265     * @return int
     266     */
     267    public function disable_payments_for_subscription( int $payments ): int {
     268        return $this->cart_contains_subscription() ? 1 : $payments;
    256269    }
    257270
     
    423436
    424437    /**
    425      * @param \WC_Payment_Token_CC $token
    426      *
    427      * @return string
     438     * @inheritDoc
    428439     */
    429440    public function get_saved_payment_method_option_html( $token ) {
     
    489500        }
    490501
    491         return absint( $min_payments );
     502        return apply_filters( 'wpg/checkout/min_payments', absint( $min_payments ) );
    492503    }
    493504
     
    535546        }
    536547
    537         return absint( $max_payments );
     548        return apply_filters( 'wpg/checkout/max_payments', absint( $max_payments ) );
    538549    }
    539550
  • woo-pelecard-gateway/trunk/includes/Plugin.php

    r2523108 r2544064  
    1818     * @var string $version
    1919     */
    20     public static $version = '1.4.5';
     20    public static $version = '1.4.6';
    2121
    2222    /**
  • woo-pelecard-gateway/trunk/readme.txt

    r2523108 r2544064  
    44Requires at least: 5.3
    55Tested up to: 5.7
    6 Stable tag: 1.4.5
     6Stable tag: 1.4.6
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5555
    5656== Changelog ==
     57
     58= 1.4.6 =
     59* Disable payments transaction for subscription orders.
    5760
    5861= 1.4.5 =
  • woo-pelecard-gateway/trunk/woocommerce-pelecard-gateway.php

    r2523108 r2544064  
    44 * Plugin URI: https://wordpress.org/plugins/woo-pelecard-gateway/
    55 * Description: Extends WooCommerce with Pelecard payment gateway.
    6  * Version: 1.4.5
     6 * Version: 1.4.6
    77 * Author: Ido Friedlander
    88 * Author URI: https://profiles.wordpress.org/idofri/
Note: See TracChangeset for help on using the changeset viewer.