WooCommerce Stripe Payment Gateway - Version 3.1.2

Version Description

  • Fix - Add payment method on My Account page error.
Download this release

Release Info

Developer royho
Plugin Icon 128x128 WooCommerce Stripe Payment Gateway
Version 3.1.2
Comparing to
See all releases

Code changes from version 3.1.1 to 3.1.2

includes/class-wc-gateway-stripe.php CHANGED
@@ -170,6 +170,17 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway_CC {
170
 
171
  if ( $this->stripe_checkout ) {
172
  $this->order_button_text = __( 'Continue to payment', 'woocommerce-gateway-stripe' );
 
 
 
 
 
 
 
 
 
 
 
173
  }
174
 
175
  if ( $this->testmode ) {
@@ -524,7 +535,7 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway_CC {
524
  * @access public
525
  */
526
  public function payment_scripts() {
527
- if ( ! is_cart() && ! is_checkout() && ! isset( $_GET['pay_for_order'] ) ) {
528
  return;
529
  }
530
 
170
 
171
  if ( $this->stripe_checkout ) {
172
  $this->order_button_text = __( 'Continue to payment', 'woocommerce-gateway-stripe' );
173
+
174
+ // Stripe checkout does not support add payment method.
175
+ if ( is_add_payment_method_page() ) {
176
+ if ( false !== ( $key = array_search( 'add_payment_method', $this->supports ) ) ) {
177
+ unset( $this->supports[ $key ] );
178
+ }
179
+
180
+ if ( false !== ( $key = array_search( 'tokenization', $this->supports ) ) ) {
181
+ unset( $this->supports[ $key ] );
182
+ }
183
+ }
184
  }
185
 
186
  if ( $this->testmode ) {
535
  * @access public
536
  */
537
  public function payment_scripts() {
538
+ if ( ! is_cart() && ! is_checkout() && ! isset( $_GET['pay_for_order'] ) && ! is_add_payment_method_page() ) {
539
  return;
540
  }
541
 
includes/class-wc-stripe-apple-pay.php CHANGED
@@ -76,7 +76,6 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
76
  */
77
  if ( version_compare( WC_VERSION, '3.0.0', '<' ) ) {
78
  add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'display_apple_pay_button' ), 1 );
79
- add_filter( 'body_class', array( $this, 'body_class' ) );
80
  } else {
81
  add_action( 'woocommerce_after_add_to_cart_quantity', array( $this, 'display_apple_pay_button' ), 1 );
82
  }
@@ -278,21 +277,6 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
278
  <?php
279
  }
280
 
281
- /**
282
- * Add legacy WooCommerce body class.
283
- *
284
- * @since 3.1.0
285
- * @version 3.1.0
286
- * @param array $classes
287
- * @return array $classes
288
- */
289
- public function body_class( $classes ) {
290
- if ( 'yes' === $this->_gateway_settings['apple_pay'] && isset( $gateways['stripe'] ) ) {
291
- $classes[] = 'wc-stripe-legacy';
292
- }
293
- return $classes;
294
- }
295
-
296
  /**
297
  * Generates the Apple Pay single cart.
298
  *
@@ -673,7 +657,7 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
673
 
674
  foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
675
  $amount = wc_format_decimal( $values['line_subtotal'], $decimals );
676
- $subtotal += $values['line_subtotal'];
677
  $quantity_label = 1 < $values['quantity'] ? ' (x' . $values['quantity'] . ')' : '';
678
 
679
  $item = array(
76
  */
77
  if ( version_compare( WC_VERSION, '3.0.0', '<' ) ) {
78
  add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'display_apple_pay_button' ), 1 );
 
79
  } else {
80
  add_action( 'woocommerce_after_add_to_cart_quantity', array( $this, 'display_apple_pay_button' ), 1 );
81
  }
277
  <?php
278
  }
279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  /**
281
  * Generates the Apple Pay single cart.
282
  *
657
 
658
  foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
659
  $amount = wc_format_decimal( $values['line_subtotal'], $decimals );
660
+ $subtotal += $values['line_subtotal'];
661
  $quantity_label = 1 < $values['quantity'] ? ' (x' . $values['quantity'] . ')' : '';
662
 
663
  $item = array(
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic, woothemes, mikejolley, akeda, royho, mattyza, slash1an
3
  Tags: credit card, stripe, woocommerce
4
  Requires at least: 4.4
5
  Tested up to: 4.7.2
6
- Stable tag: 3.1.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -95,6 +95,9 @@ If you get stuck, you can ask for help in the Plugin Forum.
95
 
96
  == Changelog ==
97
 
 
 
 
98
  = 3.1.1 =
99
  * Fix - Apple Pay error notice log link is incorrect.
100
  * Fix - Apple Pay domain verification paths check.
@@ -150,6 +153,5 @@ If you get stuck, you can ask for help in the Plugin Forum.
150
 
151
  == Upgrade Notice ==
152
 
153
- = 3.1.1 =
154
- * Fix - Apple Pay error notice log link is incorrect.
155
- * Fix - Apple Pay domain verification paths check.
3
  Tags: credit card, stripe, woocommerce
4
  Requires at least: 4.4
5
  Tested up to: 4.7.2
6
+ Stable tag: 3.1.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
95
 
96
  == Changelog ==
97
 
98
+ = 3.1.2 =
99
+ * Fix - Add payment method on My Account page error.
100
+
101
  = 3.1.1 =
102
  * Fix - Apple Pay error notice log link is incorrect.
103
  * Fix - Apple Pay domain verification paths check.
153
 
154
  == Upgrade Notice ==
155
 
156
+ = 3.1.2 =
157
+ * Fix - Add payment method on My Account page error.
 
woocommerce-gateway-stripe.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Take credit card payments on your store using Stripe.
6
  * Author: WooCommerce
7
  * Author URI: https://woocommerce.com/
8
- * Version: 3.1.1
9
  * Text Domain: woocommerce-gateway-stripe
10
  * Domain Path: /languages
11
  *
@@ -32,7 +32,7 @@ if ( ! defined( 'ABSPATH' ) ) {
32
  /**
33
  * Required minimums and constants
34
  */
35
- define( 'WC_STRIPE_VERSION', '3.1.1' );
36
  define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
37
  define( 'WC_STRIPE_MIN_WC_VER', '2.5.0' );
38
  define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
5
  * Description: Take credit card payments on your store using Stripe.
6
  * Author: WooCommerce
7
  * Author URI: https://woocommerce.com/
8
+ * Version: 3.1.2
9
  * Text Domain: woocommerce-gateway-stripe
10
  * Domain Path: /languages
11
  *
32
  /**
33
  * Required minimums and constants
34
  */
35
+ define( 'WC_STRIPE_VERSION', '3.1.2' );
36
  define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
37
  define( 'WC_STRIPE_MIN_WC_VER', '2.5.0' );
38
  define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
wordpress_org_assets/banner-1544x500.png DELETED
Binary file
wordpress_org_assets/banner-772x250.png DELETED
Binary file
wordpress_org_assets/icon-128x128.png DELETED
Binary file
wordpress_org_assets/icon-256x256.png DELETED
Binary file
wordpress_org_assets/screenshot-1.png DELETED
Binary file
wordpress_org_assets/screenshot-2.png DELETED
Binary file
wordpress_org_assets/screenshot-3.png DELETED
Binary file
wordpress_org_assets/screenshot-4.png DELETED
Binary file
wordpress_org_assets/screenshot-5.png DELETED
Binary file
wordpress_org_assets/wc-stripe.sketch DELETED
Binary file