Version Description
- Fix - When using Stripe Checkout, add payment method was disabled.
- Fix - Possible non object type when using preview pages.
Download this release
Release Info
Developer | royho |
Plugin | WooCommerce Stripe Payment Gateway |
Version | 3.1.3 |
Comparing to | |
See all releases |
Code changes from version 3.1.2 to 3.1.3
includes/class-wc-gateway-stripe.php
CHANGED
@@ -170,17 +170,6 @@ 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 |
-
// 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 ) {
|
@@ -421,7 +410,7 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway_CC {
|
|
421 |
$total = WC()->cart->total;
|
422 |
|
423 |
// If paying from order, we need to get total from order not cart.
|
424 |
-
if ( isset( $_GET['pay_for_order'] ) &&
|
425 |
$order = wc_get_order( wc_get_order_id_by_order_key( wc_clean( $_GET['key'] ) ) );
|
426 |
$total = $order->get_total();
|
427 |
}
|
@@ -543,7 +532,7 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway_CC {
|
|
543 |
|
544 |
if ( $this->stripe_checkout ) {
|
545 |
wp_enqueue_script( 'stripe_checkout', 'https://checkout.stripe.com/v2/checkout.js', '', '2.0', true );
|
546 |
-
wp_enqueue_script( 'woocommerce_stripe', plugins_url( 'assets/js/stripe-checkout' . $suffix . '.js', WC_STRIPE_MAIN_FILE ), array( '
|
547 |
} else {
|
548 |
wp_enqueue_script( 'stripe', 'https://js.stripe.com/v2/', '', '1.0', true );
|
549 |
wp_enqueue_script( 'woocommerce_stripe', plugins_url( 'assets/js/stripe' . $suffix . '.js', WC_STRIPE_MAIN_FILE ), array( 'jquery-payment', 'stripe' ), WC_STRIPE_VERSION, true );
|
170 |
|
171 |
if ( $this->stripe_checkout ) {
|
172 |
$this->order_button_text = __( 'Continue to payment', 'woocommerce-gateway-stripe' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
}
|
174 |
|
175 |
if ( $this->testmode ) {
|
410 |
$total = WC()->cart->total;
|
411 |
|
412 |
// If paying from order, we need to get total from order not cart.
|
413 |
+
if ( isset( $_GET['pay_for_order'] ) && ! empty( $_GET['key'] ) ) {
|
414 |
$order = wc_get_order( wc_get_order_id_by_order_key( wc_clean( $_GET['key'] ) ) );
|
415 |
$total = $order->get_total();
|
416 |
}
|
532 |
|
533 |
if ( $this->stripe_checkout ) {
|
534 |
wp_enqueue_script( 'stripe_checkout', 'https://checkout.stripe.com/v2/checkout.js', '', '2.0', true );
|
535 |
+
wp_enqueue_script( 'woocommerce_stripe', plugins_url( 'assets/js/stripe-checkout' . $suffix . '.js', WC_STRIPE_MAIN_FILE ), array( 'stripe_checkout' ), WC_STRIPE_VERSION, true );
|
536 |
} else {
|
537 |
wp_enqueue_script( 'stripe', 'https://js.stripe.com/v2/', '', '1.0', true );
|
538 |
wp_enqueue_script( 'woocommerce_stripe', plugins_url( 'assets/js/stripe' . $suffix . '.js', WC_STRIPE_MAIN_FILE ), array( 'jquery-payment', 'stripe' ), WC_STRIPE_VERSION, true );
|
includes/class-wc-stripe-apple-pay.php
CHANGED
@@ -127,7 +127,7 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
|
|
127 |
|
128 |
$product = wc_get_product( $post->ID );
|
129 |
|
130 |
-
if ( ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), $this->supported_product_types() ) ) {
|
131 |
return;
|
132 |
}
|
133 |
|
127 |
|
128 |
$product = wc_get_product( $post->ID );
|
129 |
|
130 |
+
if ( ! is_object( $product ) || ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), $this->supported_product_types() ) ) {
|
131 |
return;
|
132 |
}
|
133 |
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== WooCommerce Stripe Payment Gateway ===
|
2 |
-
Contributors: automattic, woothemes, mikejolley, akeda, royho, mattyza, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, mikaey, dsmithweb, fullysupportedphil, corsonr, deskroid, luminus, tiagonoronha
|
3 |
Tags: credit card, stripe, woocommerce
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.7.2
|
6 |
-
Stable tag: 3.1.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -95,6 +95,10 @@ If you get stuck, you can ask for help in the Plugin Forum.
|
|
95 |
|
96 |
== Changelog ==
|
97 |
|
|
|
|
|
|
|
|
|
98 |
= 3.1.2 =
|
99 |
* Fix - Add payment method on My Account page error.
|
100 |
|
@@ -153,5 +157,6 @@ If you get stuck, you can ask for help in the Plugin Forum.
|
|
153 |
|
154 |
== Upgrade Notice ==
|
155 |
|
156 |
-
= 3.1.
|
157 |
-
* Fix -
|
|
1 |
=== WooCommerce Stripe Payment Gateway ===
|
2 |
+
Contributors: automattic, woothemes, mikejolley, akeda, royho, mattyza, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, mikaey, dsmithweb, fullysupportedphil, corsonr, deskroid, luminus, tiagonoronha, zandyring
|
3 |
Tags: credit card, stripe, woocommerce
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.7.2
|
6 |
+
Stable tag: 3.1.3
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
95 |
|
96 |
== Changelog ==
|
97 |
|
98 |
+
= 3.1.3 =
|
99 |
+
* Fix - When using Stripe Checkout, add payment method was disabled.
|
100 |
+
* Fix - Possible non object type when using preview pages.
|
101 |
+
|
102 |
= 3.1.2 =
|
103 |
* Fix - Add payment method on My Account page error.
|
104 |
|
157 |
|
158 |
== Upgrade Notice ==
|
159 |
|
160 |
+
= 3.1.3 =
|
161 |
+
* Fix - When using Stripe Checkout, add payment method was disabled.
|
162 |
+
* Fix - Possible non object type when using preview pages.
|
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.
|
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.
|
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.3
|
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.3' );
|
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__ );
|