Version Description
- 2021-09-01 =
- Fix - Get Subscription CustomerID from Order instead of User.
See changelog for all versions.
Download this release
Release Info
| Developer | automattic |
| Plugin | |
| Version | 5.4.1 |
| Comparing to | |
| See all releases | |
Code changes from version 5.4.0 to 5.4.1
changelog.txt
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
*** Changelog ***
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
= 5.4.0 - 2021-08-18 =
|
| 4 |
* Fix - Do not ask for a Shipping Address if no Shipping Zone is defined.
|
| 5 |
* Fix - Return HTTP 204 when webhook validation fails so Stripe won't stop sending certain webhook events after too many failed validations.
|
| 1 |
*** Changelog ***
|
| 2 |
|
| 3 |
+
= 5.4.1 - 2021-09-01 =
|
| 4 |
+
* Fix - Get Subscription CustomerID from Order instead of User.
|
| 5 |
+
|
| 6 |
= 5.4.0 - 2021-08-18 =
|
| 7 |
* Fix - Do not ask for a Shipping Address if no Shipping Zone is defined.
|
| 8 |
* Fix - Return HTTP 204 when webhook validation fails so Stripe won't stop sending certain webhook events after too many failed validations.
|
includes/abstracts/abstract-wc-stripe-payment-gateway.php
CHANGED
|
@@ -281,16 +281,14 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
| 281 |
* @version 4.0.0
|
| 282 |
*/
|
| 283 |
public function get_stripe_customer_id( $order ) {
|
| 284 |
-
|
|
|
|
| 285 |
|
| 286 |
if ( empty( $customer ) ) {
|
| 287 |
-
|
| 288 |
-
return $order->get_meta( '_stripe_customer_id', true );
|
| 289 |
-
} else {
|
| 290 |
-
return $customer;
|
| 291 |
}
|
| 292 |
|
| 293 |
-
return
|
| 294 |
}
|
| 295 |
|
| 296 |
/**
|
| 281 |
* @version 4.0.0
|
| 282 |
*/
|
| 283 |
public function get_stripe_customer_id( $order ) {
|
| 284 |
+
// Try to get it via the order first.
|
| 285 |
+
$customer = $order->get_meta( '_stripe_customer_id', true );
|
| 286 |
|
| 287 |
if ( empty( $customer ) ) {
|
| 288 |
+
$customer = get_user_option( '_stripe_customer_id', $order->get_customer_id() );
|
|
|
|
|
|
|
|
|
|
| 289 |
}
|
| 290 |
|
| 291 |
+
return $customer;
|
| 292 |
}
|
| 293 |
|
| 294 |
/**
|
languages/woocommerce-gateway-stripe.pot
CHANGED
|
@@ -2,10 +2,10 @@
|
|
| 2 |
# This file is distributed under the same license as the WooCommerce Stripe Gateway package.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
-
"Project-Id-Version: WooCommerce Stripe Gateway 5.4.
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
|
| 8 |
-
"POT-Creation-Date: 2021-
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -37,25 +37,25 @@ msgstr ""
|
|
| 37 |
msgid "Sorry, the minimum allowed order total is %1$s to use this payment method."
|
| 38 |
msgstr ""
|
| 39 |
|
| 40 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 41 |
#. translators: 1) blog name 2) order number
|
| 42 |
msgid "%1$s - Order %2$s"
|
| 43 |
msgstr ""
|
| 44 |
|
| 45 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 46 |
msgid "customer_name"
|
| 47 |
msgstr ""
|
| 48 |
|
| 49 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 50 |
msgid "customer_email"
|
| 51 |
msgstr ""
|
| 52 |
|
| 53 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 54 |
#. translators: transaction id
|
| 55 |
msgid "Stripe charge awaiting payment: %s."
|
| 56 |
msgstr ""
|
| 57 |
|
| 58 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 59 |
#: includes/class-wc-stripe-order-handler.php:296
|
| 60 |
#: includes/class-wc-stripe-webhook-handler.php:414
|
| 61 |
#: includes/class-wc-stripe-webhook-handler.php:464
|
|
@@ -63,13 +63,13 @@ msgstr ""
|
|
| 63 |
msgid "Stripe charge complete (Charge ID: %s)"
|
| 64 |
msgstr ""
|
| 65 |
|
| 66 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 67 |
#: includes/class-wc-gateway-stripe.php:515
|
| 68 |
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:187
|
| 69 |
msgid "Payment processing failed. Please retry."
|
| 70 |
msgstr ""
|
| 71 |
|
| 72 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 73 |
#. translators: transaction id
|
| 74 |
msgid ""
|
| 75 |
"Stripe charge authorized (Charge ID: %s). Process order to take payment, or "
|
|
@@ -77,33 +77,33 @@ msgid ""
|
|
| 77 |
"part or in full will release the authorization and cancel the payment."
|
| 78 |
msgstr ""
|
| 79 |
|
| 80 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 81 |
msgid "Invalid payment method. Please input a new card number."
|
| 82 |
msgstr ""
|
| 83 |
|
| 84 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 85 |
#. translators: %1$s is a stripe error message
|
| 86 |
msgid "There was a problem initiating a refund: %1$s"
|
| 87 |
msgstr ""
|
| 88 |
|
| 89 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 90 |
#. translators: amount (including currency symbol)
|
| 91 |
msgid "Pre-Authorization for %s voided."
|
| 92 |
msgstr ""
|
| 93 |
|
| 94 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 95 |
msgid ""
|
| 96 |
"The authorization was voided and the order cancelled. Click okay to "
|
| 97 |
"continue, then refresh the page."
|
| 98 |
msgstr ""
|
| 99 |
|
| 100 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 101 |
#. translators: 1) amount (including currency symbol) 2) transaction id 3)
|
| 102 |
#. refund message
|
| 103 |
msgid "Refunded %1$s - Refund ID: %2$s - Reason: %3$s"
|
| 104 |
msgstr ""
|
| 105 |
|
| 106 |
-
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:
|
| 107 |
msgid "There was a problem adding the payment method."
|
| 108 |
msgstr ""
|
| 109 |
|
| 2 |
# This file is distributed under the same license as the WooCommerce Stripe Gateway package.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: WooCommerce Stripe Gateway 5.4.1\n"
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
|
| 8 |
+
"POT-Creation-Date: 2021-09-01 22:21:55+00:00\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 37 |
msgid "Sorry, the minimum allowed order total is %1$s to use this payment method."
|
| 38 |
msgstr ""
|
| 39 |
|
| 40 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:348
|
| 41 |
#. translators: 1) blog name 2) order number
|
| 42 |
msgid "%1$s - Order %2$s"
|
| 43 |
msgstr ""
|
| 44 |
|
| 45 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:389
|
| 46 |
msgid "customer_name"
|
| 47 |
msgstr ""
|
| 48 |
|
| 49 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:390
|
| 50 |
msgid "customer_email"
|
| 51 |
msgstr ""
|
| 52 |
|
| 53 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:453
|
| 54 |
#. translators: transaction id
|
| 55 |
msgid "Stripe charge awaiting payment: %s."
|
| 56 |
msgstr ""
|
| 57 |
|
| 58 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:460
|
| 59 |
#: includes/class-wc-stripe-order-handler.php:296
|
| 60 |
#: includes/class-wc-stripe-webhook-handler.php:414
|
| 61 |
#: includes/class-wc-stripe-webhook-handler.php:464
|
| 63 |
msgid "Stripe charge complete (Charge ID: %s)"
|
| 64 |
msgstr ""
|
| 65 |
|
| 66 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:465
|
| 67 |
#: includes/class-wc-gateway-stripe.php:515
|
| 68 |
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:187
|
| 69 |
msgid "Payment processing failed. Please retry."
|
| 70 |
msgstr ""
|
| 71 |
|
| 72 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:477
|
| 73 |
#. translators: transaction id
|
| 74 |
msgid ""
|
| 75 |
"Stripe charge authorized (Charge ID: %s). Process order to take payment, or "
|
| 77 |
"part or in full will release the authorization and cancel the payment."
|
| 78 |
msgstr ""
|
| 79 |
|
| 80 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:658
|
| 81 |
msgid "Invalid payment method. Please input a new card number."
|
| 82 |
msgstr ""
|
| 83 |
|
| 84 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:923
|
| 85 |
#. translators: %1$s is a stripe error message
|
| 86 |
msgid "There was a problem initiating a refund: %1$s"
|
| 87 |
msgstr ""
|
| 88 |
|
| 89 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:937
|
| 90 |
#. translators: amount (including currency symbol)
|
| 91 |
msgid "Pre-Authorization for %s voided."
|
| 92 |
msgstr ""
|
| 93 |
|
| 94 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:942
|
| 95 |
msgid ""
|
| 96 |
"The authorization was voided and the order cancelled. Click okay to "
|
| 97 |
"continue, then refresh the page."
|
| 98 |
msgstr ""
|
| 99 |
|
| 100 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:956
|
| 101 |
#. translators: 1) amount (including currency symbol) 2) transaction id 3)
|
| 102 |
#. refund message
|
| 103 |
msgid "Refunded %1$s - Refund ID: %2$s - Reason: %3$s"
|
| 104 |
msgstr ""
|
| 105 |
|
| 106 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:974
|
| 107 |
msgid "There was a problem adding the payment method."
|
| 108 |
msgstr ""
|
| 109 |
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort,
|
|
| 4 |
Requires at least: 4.6
|
| 5 |
Tested up to: 5.7
|
| 6 |
Requires PHP: 5.6
|
| 7 |
-
Stable tag: 5.4.
|
| 8 |
License: GPLv3
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
Attributions: thorsten-stripe
|
|
@@ -126,10 +126,7 @@ If you get stuck, you can ask for help in the Plugin Forum.
|
|
| 126 |
|
| 127 |
== Changelog ==
|
| 128 |
|
| 129 |
-
= 5.4.
|
| 130 |
-
* Fix -
|
| 131 |
-
* Fix - Return HTTP 204 when webhook validation fails so Stripe won't stop sending certain webhook events after too many failed validations.
|
| 132 |
-
* Fix - Possible use of an undefined variable `prepared_source`.
|
| 133 |
-
* Add - 'wc_stripe_allowed_payment_processing_statuses' filter to customize order statuses that allow payment processing in the context of 3DS payments.
|
| 134 |
|
| 135 |
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).
|
| 4 |
Requires at least: 4.6
|
| 5 |
Tested up to: 5.7
|
| 6 |
Requires PHP: 5.6
|
| 7 |
+
Stable tag: 5.4.1
|
| 8 |
License: GPLv3
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
Attributions: thorsten-stripe
|
| 126 |
|
| 127 |
== Changelog ==
|
| 128 |
|
| 129 |
+
= 5.4.1 - 2021-09-01 =
|
| 130 |
+
* Fix - Get Subscription CustomerID from Order instead of User.
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).
|
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: 5.4.
|
| 9 |
* Requires at least: 4.6
|
| 10 |
* Tested up to: 5.7
|
| 11 |
* WC requires at least: 3.3
|
|
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 21 |
/**
|
| 22 |
* Required minimums and constants
|
| 23 |
*/
|
| 24 |
-
define( 'WC_STRIPE_VERSION', '5.4.
|
| 25 |
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
|
| 26 |
define( 'WC_STRIPE_MIN_WC_VER', '3.0' );
|
| 27 |
define( 'WC_STRIPE_FUTURE_MIN_WC_VER', '3.3' );
|
| 5 |
* Description: Take credit card payments on your store using Stripe.
|
| 6 |
* Author: WooCommerce
|
| 7 |
* Author URI: https://woocommerce.com/
|
| 8 |
+
* Version: 5.4.1
|
| 9 |
* Requires at least: 4.6
|
| 10 |
* Tested up to: 5.7
|
| 11 |
* WC requires at least: 3.3
|
| 21 |
/**
|
| 22 |
* Required minimums and constants
|
| 23 |
*/
|
| 24 |
+
define( 'WC_STRIPE_VERSION', '5.4.1' ); // WRCS: DEFINED_VERSION.
|
| 25 |
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
|
| 26 |
define( 'WC_STRIPE_MIN_WC_VER', '3.0' );
|
| 27 |
define( 'WC_STRIPE_FUTURE_MIN_WC_VER', '3.3' );
|
