Changeset 2544064
- Timestamp:
- 06/08/2021 06:28:20 AM (5 years ago)
- Location:
- woo-pelecard-gateway/trunk
- Files:
-
- 4 edited
-
includes/Gateway.php (modified) (5 diffs)
-
includes/Plugin.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
woocommerce-pelecard-gateway.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woo-pelecard-gateway/trunk/includes/Gateway.php
r2523108 r2544064 182 182 // Upay 183 183 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' ] ); 184 188 } 185 189 … … 254 258 255 259 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; 256 269 } 257 270 … … 423 436 424 437 /** 425 * @param \WC_Payment_Token_CC $token 426 * 427 * @return string 438 * @inheritDoc 428 439 */ 429 440 public function get_saved_payment_method_option_html( $token ) { … … 489 500 } 490 501 491 return a bsint( $min_payments);502 return apply_filters( 'wpg/checkout/min_payments', absint( $min_payments ) ); 492 503 } 493 504 … … 535 546 } 536 547 537 return a bsint( $max_payments);548 return apply_filters( 'wpg/checkout/max_payments', absint( $max_payments ) ); 538 549 } 539 550 -
woo-pelecard-gateway/trunk/includes/Plugin.php
r2523108 r2544064 18 18 * @var string $version 19 19 */ 20 public static $version = '1.4. 5';20 public static $version = '1.4.6'; 21 21 22 22 /** -
woo-pelecard-gateway/trunk/readme.txt
r2523108 r2544064 4 4 Requires at least: 5.3 5 5 Tested up to: 5.7 6 Stable tag: 1.4. 56 Stable tag: 1.4.6 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 55 55 56 56 == Changelog == 57 58 = 1.4.6 = 59 * Disable payments transaction for subscription orders. 57 60 58 61 = 1.4.5 = -
woo-pelecard-gateway/trunk/woocommerce-pelecard-gateway.php
r2523108 r2544064 4 4 * Plugin URI: https://wordpress.org/plugins/woo-pelecard-gateway/ 5 5 * Description: Extends WooCommerce with Pelecard payment gateway. 6 * Version: 1.4. 56 * Version: 1.4.6 7 7 * Author: Ido Friedlander 8 8 * Author URI: https://profiles.wordpress.org/idofri/
Note: See TracChangeset
for help on using the changeset viewer.