WooCommerce Stripe Payment Gateway - Version 4.3.3

Version Description

2020-04-08 = * Fix - Fix Payment Request issue when product attribute has quotes * Fix - Fix "no such customer" error on checkout after the keys have been changed * Add - Add alert for end of support WC < 3.0 in future releases * Fix - Fix crash when used with WooCommerce Subscriptions <2.6 * Fix - Add missing customer ID to subscriptions before processing payment * Fix - Fix transactions failing with trailing slash

Download this release

Release Info

Developer woothemes
Plugin Icon 128x128 WooCommerce Stripe Payment Gateway
Version 4.3.3
Comparing to
See all releases

Code changes from version 4.3.2 to 4.3.3

changelog.txt CHANGED
@@ -1,5 +1,13 @@
1
*** Changelog ***
2
3
= 4.3.2 2020-02-17 =
4
* Fix - Add compatibility to payment request buttons with some of the WooCommerce Product Add-ons on the product page
5
* Fix - Improved compatibility for free orders with other extensions
1
*** Changelog ***
2
3
+ = 4.3.3 2020-04-08 =
4
+ * Fix - Fix Payment Request issue when product attribute has quotes
5
+ * Fix - Fix "no such customer" error on checkout after the keys have been changed
6
+ * Add - Add alert for end of support WC < 3.0 in future releases
7
+ * Fix - Fix crash when used with WooCommerce Subscriptions <2.6
8
+ * Fix - Add missing customer ID to subscriptions before processing payment
9
+ * Fix - Fix transactions failing with trailing slash
10
+
11
= 4.3.2 2020-02-17 =
12
* Fix - Add compatibility to payment request buttons with some of the WooCommerce Product Add-ons on the product page
13
* Fix - Improved compatibility for free orders with other extensions
includes/abstracts/abstract-wc-stripe-payment-gateway.php CHANGED
@@ -646,7 +646,7 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
646
$customer->set_id( $customer->create_customer() );
647
$customer_id = $customer->get_id();
648
} else {
649
- $customer->update_customer();
650
}
651
652
if ( empty( $source_object ) && ! $is_token ) {
@@ -1248,32 +1248,76 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
1248
* @return obect|bool Either the intent object or `false`.
1249
*/
1250
public function get_intent_from_order( $order ) {
1251
- $order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->id : $order->get_id();
1252
-
1253
if ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ) {
1254
- $intent_id = get_post_meta( $order_id, '_stripe_intent_id', true );
1255
- } else {
1256
- $intent_id = $order->get_meta( '_stripe_intent_id' );
1257
}
1258
1259
if ( $intent_id ) {
1260
- return WC_Stripe_API::request( array(), "payment_intents/$intent_id", 'GET' );
1261
}
1262
1263
// The order doesn't have a payment intent, but it may have a setup intent.
1264
- if ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ) {
1265
- $intent_id = get_post_meta( $order_id, '_stripe_setup_intent', true );
1266
- } else {
1267
- $intent_id = $order->get_meta( '_stripe_setup_intent' );
1268
}
1269
1270
if ( $intent_id ) {
1271
- return WC_Stripe_API::request( array(), "setup_intents/$intent_id", 'GET' );
1272
}
1273
1274
return false;
1275
}
1276
1277
/**
1278
* Locks an order for payment intent processing for 5 minutes.
1279
*
@@ -1418,7 +1462,23 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
1418
}
1419
1420
/**
1421
- * Verifies whether a certain ZIP code is valid for the US, incl. 4-digit extensions.
1422
*
1423
* @param string $zip The ZIP code to verify.
1424
* @return boolean
646
$customer->set_id( $customer->create_customer() );
647
$customer_id = $customer->get_id();
648
} else {
649
+ $customer_id = $customer->update_customer();
650
}
651
652
if ( empty( $source_object ) && ! $is_token ) {
1248
* @return obect|bool Either the intent object or `false`.
1249
*/
1250
public function get_intent_from_order( $order ) {
1251
if ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ) {
1252
+ return $this->pre_3_0_get_intent_from_order( $order );
1253
}
1254
1255
+ $order_id = $order->get_id();
1256
+ $intent_id = $order->get_meta( '_stripe_intent_id' );
1257
+
1258
if ( $intent_id ) {
1259
+ return $this->get_intent( 'payment_intents', $intent_id );
1260
}
1261
1262
// The order doesn't have a payment intent, but it may have a setup intent.
1263
+ $intent_id = $order->get_meta( '_stripe_setup_intent' );
1264
+
1265
+ if ( $intent_id ) {
1266
+ return $this->get_intent( 'setup_intents', $intent_id );
1267
+ }
1268
+
1269
+ return false;
1270
+ }
1271
+
1272
+ /**
1273
+ * Retrieves the payment intent, associated with an order for WooCommerce < 3.0
1274
+ *
1275
+ * @param WC_Order $order The order to retrieve an intent for.
1276
+ * @return obect|bool Either the intent object or `false`.
1277
+ */
1278
+ private function pre_3_0_get_intent_from_order( $order ) {
1279
+ $order_id = $order->id;
1280
+ $intent_id = get_post_meta( $order_id, '_stripe_intent_id', true );
1281
+
1282
+ if ( $intent_id ) {
1283
+ return $this->get_intent( 'payment_intents', $intent_id );
1284
}
1285
1286
+ // The order doesn't have a payment intent, but it may have a setup intent.
1287
+ $intent_id = get_post_meta( $order_id, '_stripe_setup_intent', true );
1288
+
1289
if ( $intent_id ) {
1290
+ return $this->get_intent( 'setup_intents', $intent_id );
1291
}
1292
1293
return false;
1294
}
1295
1296
+ /**
1297
+ * Retrieves intent from Stripe API by intent id.
1298
+ *
1299
+ * @param string $intent_type Either 'payment_intents' or 'setup_intents'.
1300
+ * @param string $intent_id Intent id.
1301
+ * @return object|bool Either the intent object or `false`.
1302
+ * @throws Exception Throws exception for unknown $intent_type.
1303
+ */
1304
+ private function get_intent( $intent_type, $intent_id ) {
1305
+ if ( ! in_array( $intent_type, [ 'payment_intents', 'setup_intents' ] ) ) {
1306
+ throw new Exception( "Failed to get intent of type $intent_type. Type is not allowed" );
1307
+ }
1308
+
1309
+ $response = WC_Stripe_API::request( array(), "$intent_type/$intent_id", 'GET' );
1310
+
1311
+ if ( $response && isset( $response->{ 'error' } ) ) {
1312
+ $error_response_message = print_r( $response, true );
1313
+ WC_Stripe_Logger::log("Failed to get Stripe intent $intent_type/$intent_id.");
1314
+ WC_Stripe_Logger::log("Response: $error_response_message");
1315
+ return false;
1316
+ }
1317
+
1318
+ return $response;
1319
+ }
1320
+
1321
/**
1322
* Locks an order for payment intent processing for 5 minutes.
1323
*
1462
}
1463
1464
/**
1465
+ * Checks if subscription has a Stripe customer ID and adds it if doesn't.
1466
+ *
1467
+ * Fix renewal for existing subscriptions affected by https://github.com/woocommerce/woocommerce-gateway-stripe/issues/1072.
1468
+ * @param int $order_id subscription renewal order id.
1469
+ */
1470
+ public function ensure_subscription_has_customer_id( $order_id ) {
1471
+ $subscriptions_ids = wcs_get_subscriptions_for_order( $order_id, array( 'order_type' => 'any' ) );
1472
+ foreach( $subscriptions_ids as $subscription_id => $subscription ) {
1473
+ if ( ! metadata_exists( 'post', $subscription_id, '_stripe_customer_id' ) ) {
1474
+ $stripe_customer = new WC_Stripe_Customer( $subscription->get_user_id() );
1475
+ update_post_meta( $subscription_id, '_stripe_customer_id', $stripe_customer->get_id() );
1476
+ update_post_meta( $order_id, '_stripe_customer_id', $stripe_customer->get_id() );
1477
+ }
1478
+ }
1479
+ }
1480
+
1481
+ /** Verifies whether a certain ZIP code is valid for the US, incl. 4-digit extensions.
1482
*
1483
* @param string $zip The ZIP code to verify.
1484
* @return boolean
includes/admin/class-wc-stripe-admin-notices.php CHANGED
@@ -148,13 +148,17 @@ class WC_Stripe_Admin_Notices {
148
}
149
150
if ( empty( $show_wcver_notice ) ) {
151
- if ( version_compare( WC_VERSION, WC_STRIPE_MIN_WC_VER, '<' ) ) {
152
/* translators: 1) int version 2) int version */
153
$message = __( 'WooCommerce Stripe - The minimum WooCommerce version required for this plugin is %1$s. You are running %2$s.', 'woocommerce-gateway-stripe' );
154
155
$this->add_admin_notice( 'wcver', 'notice notice-warning', sprintf( $message, WC_STRIPE_MIN_WC_VER, WC_VERSION ), true );
156
157
return;
158
}
159
}
160
148
}
149
150
if ( empty( $show_wcver_notice ) ) {
151
+ if ( WC_Stripe_Helper::is_wc_lt( WC_STRIPE_MIN_WC_VER ) ) {
152
/* translators: 1) int version 2) int version */
153
$message = __( 'WooCommerce Stripe - The minimum WooCommerce version required for this plugin is %1$s. You are running %2$s.', 'woocommerce-gateway-stripe' );
154
155
$this->add_admin_notice( 'wcver', 'notice notice-warning', sprintf( $message, WC_STRIPE_MIN_WC_VER, WC_VERSION ), true );
156
157
return;
158
+ } elseif ( WC_Stripe_Helper::is_wc_lt( WC_STRIPE_FUTURE_MIN_WC_VER ) ) {
159
+ /* translators: 1) int version 2) int version */
160
+ $message = __( 'WooCommerce Stripe - This is the last version of the plugin compatible with WooCommerce %1$s. All furture versions of the plugin will require WooCommerce %2$s or greater.', 'woocommerce-gateway-stripe' );
161
+ $this->add_admin_notice( 'wcver', 'notice notice-warning', sprintf( $message, WC_VERSION, WC_STRIPE_FUTURE_MIN_WC_VER ), true );
162
}
163
}
164
includes/class-wc-gateway-stripe.php CHANGED
@@ -379,7 +379,7 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
379
&& ! isset( $_GET['pay_for_order'] ) // wpcs: csrf ok.
380
&& ! is_add_payment_method_page()
381
&& ! isset( $_GET['change_payment_method'] ) // wpcs: csrf ok.
382
- && ! ( ! empty( get_query_var( 'view-subscription' ) ) && class_exists( 'WCS_Early_Renewal_Manager' ) && WCS_Early_Renewal_Manager::is_early_renewal_via_modal_enabled() )
383
|| ( is_order_received_page() )
384
) {
385
return;
379
&& ! isset( $_GET['pay_for_order'] ) // wpcs: csrf ok.
380
&& ! is_add_payment_method_page()
381
&& ! isset( $_GET['change_payment_method'] ) // wpcs: csrf ok.
382
+ && ! ( ! empty( get_query_var( 'view-subscription' ) ) && is_callable( 'WCS_Early_Renewal_Manager::is_early_renewal_via_modal_enabled' ) && WCS_Early_Renewal_Manager::is_early_renewal_via_modal_enabled() )
383
|| ( is_order_received_page() )
384
) {
385
return;
includes/class-wc-stripe-customer.php CHANGED
@@ -172,9 +172,14 @@ class WC_Stripe_Customer {
172
/**
173
* Updates the Stripe customer through the API.
174
*
175
- * @param array $args Additional arguments for the request (optional).
176
*/
177
- public function update_customer( $args = array() ) {
178
if ( empty( $this->get_id() ) ) {
179
throw new WC_Stripe_Exception( 'id_required_to_update_user', __( 'Attempting to update a Stripe customer without a customer ID.', 'woocommerce-gateway-stripe' ) );
180
}
@@ -184,24 +189,11 @@ class WC_Stripe_Customer {
184
$response = WC_Stripe_API::request( $args, 'customers/' . $this->get_id() );
185
186
if ( ! empty( $response->error ) ) {
187
- if ( $this->is_no_such_customer_error( $response->error ) ) {
188
- $message = $response->error->message;
189
-
190
- if ( ! preg_match( '/similar object exists/i', $message ) ) {
191
- $options = get_option( 'woocommerce_stripe_settings' );
192
- $testmode = isset( $options['testmode'] ) && 'yes' === $options['testmode'];
193
-
194
- $message = sprintf(
195
- ( $testmode
196
- // Translators: %s is a message, which states that no such customer exists, without a full stop at the end.
197
- ? __( '%s. Was the customer created in live mode? ', 'woocommerce-gateway-stripe' )
198
- // Translators: %s is a message, which states that no such customer exists, without a full stop at the end.
199
- : __( '%s. Was the customer created in test mode? ', 'woocommerce-gateway-stripe' ) ),
200
- $message
201
- );
202
- }
203
-
204
- throw new WC_Stripe_Exception( print_r( $response, true ), $message );
205
}
206
207
throw new WC_Stripe_Exception( print_r( $response, true ), $response->error->message );
@@ -211,6 +203,8 @@ class WC_Stripe_Customer {
211
$this->set_customer_data( $response );
212
213
do_action( 'woocommerce_stripe_update_customer', $args, $response );
214
}
215
216
/**
@@ -252,8 +246,7 @@ class WC_Stripe_Customer {
252
// but no longer exists. Instead of failing, lets try to create a
253
// new customer.
254
if ( $this->is_no_such_customer_error( $response->error ) ) {
255
- $this->delete_id_from_meta();
256
- $this->create_customer();
257
return $this->add_source( $source_id );
258
} else {
259
return $response;
@@ -420,4 +413,14 @@ class WC_Stripe_Customer {
420
public function delete_id_from_meta() {
421
delete_user_option( $this->get_user_id(), '_stripe_customer_id', false );
422
}
423
}
172
/**
173
* Updates the Stripe customer through the API.
174
*
175
+ * @param array $args Additional arguments for the request (optional).
176
+ * @param bool $is_retry Whether the current call is a retry (optional, defaults to false). If true, then an exception will be thrown instead of further retries on error.
177
+ *
178
+ * @return string Customer ID
179
+ *
180
+ * @throws WC_Stripe_Exception
181
*/
182
+ public function update_customer( $args = array(), $is_retry = false ) {
183
if ( empty( $this->get_id() ) ) {
184
throw new WC_Stripe_Exception( 'id_required_to_update_user', __( 'Attempting to update a Stripe customer without a customer ID.', 'woocommerce-gateway-stripe' ) );
185
}
189
$response = WC_Stripe_API::request( $args, 'customers/' . $this->get_id() );
190
191
if ( ! empty( $response->error ) ) {
192
+ if ( $this->is_no_such_customer_error( $response->error ) && ! $is_retry ) {
193
+ // This can happen when switching the main Stripe account or importing users from another site.
194
+ // If not already retrying, recreate the customer and then try updating it again.
195
+ $this->recreate_customer();
196
+ return $this->update_customer( $args, true );
197
}
198
199
throw new WC_Stripe_Exception( print_r( $response, true ), $response->error->message );
203
$this->set_customer_data( $response );
204
205
do_action( 'woocommerce_stripe_update_customer', $args, $response );
206
+
207
+ return $this->get_id();
208
}
209
210
/**
246
// but no longer exists. Instead of failing, lets try to create a
247
// new customer.
248
if ( $this->is_no_such_customer_error( $response->error ) ) {
249
+ $this->recreate_customer();
250
return $this->add_source( $source_id );
251
} else {
252
return $response;
413
public function delete_id_from_meta() {
414
delete_user_option( $this->get_user_id(), '_stripe_customer_id', false );
415
}
416
+
417
+ /**
418
+ * Recreates the customer for this user.
419
+ *
420
+ * @return string ID of the new Customer object.
421
+ */
422
+ private function recreate_customer() {
423
+ $this->delete_id_from_meta();
424
+ return $this->create_customer();
425
+ }
426
}
includes/compat/class-wc-stripe-sepa-subs-compat.php CHANGED
@@ -219,17 +219,26 @@ class WC_Stripe_Sepa_Subs_Compat extends WC_Gateway_Stripe_Sepa {
219
try {
220
if ( $amount * 100 < WC_Stripe_Helper::get_minimum_amount() ) {
221
/* translators: minimum amount */
222
- return new WP_Error( 'stripe_error', sprintf( __( 'Sorry, the minimum allowed order total is %1$s to use this payment method.', 'woocommerce-gateway-stripe' ), wc_price( WC_Stripe_Helper::get_minimum_amount() / 100 ) ) );
223
}
224
225
$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $renewal_order->id : $renewal_order->get_id();
226
227
// Get source from order
228
$prepared_source = $this->prepare_order_source( $renewal_order );
229
$source_object = $prepared_source->source_object;
230
231
if ( ! $prepared_source->customer ) {
232
- return new WP_Error( 'stripe_error', __( 'Customer not found', 'woocommerce-gateway-stripe' ) );
233
}
234
235
WC_Stripe_Logger::log( "Info: Begin processing subscription payment for order {$order_id} for the amount of {$amount}" );
@@ -389,7 +398,11 @@ class WC_Stripe_Sepa_Subs_Compat extends WC_Gateway_Stripe_Sepa {
389
if ( $this->id === $payment_method_id ) {
390
391
if ( ! isset( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) || empty( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) ) {
392
- throw new Exception( __( 'A "Stripe Customer ID" value is required.', 'woocommerce-gateway-stripe' ) );
393
} elseif ( 0 !== strpos( $payment_meta['post_meta']['_stripe_customer_id']['value'], 'cus_' ) ) {
394
throw new Exception( __( 'Invalid customer ID. A valid "Stripe Customer ID" must begin with "cus_".', 'woocommerce-gateway-stripe' ) );
395
}
219
try {
220
if ( $amount * 100 < WC_Stripe_Helper::get_minimum_amount() ) {
221
/* translators: minimum amount */
222
+ $message = sprintf( __( 'Sorry, the minimum allowed order total is %1$s to use this payment method.', 'woocommerce-gateway-stripe' ), wc_price( WC_Stripe_Helper::get_minimum_amount() / 100 ) );
223
+ throw new WC_Stripe_Exception(
224
+ 'Error while processing renewal order ' . $renewal_order->get_id() . ' : ' . $message,
225
+ $message
226
+ );
227
}
228
229
$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $renewal_order->id : $renewal_order->get_id();
230
231
+ $this->ensure_subscription_has_customer_id( $order_id );
232
+
233
// Get source from order
234
$prepared_source = $this->prepare_order_source( $renewal_order );
235
$source_object = $prepared_source->source_object;
236
237
if ( ! $prepared_source->customer ) {
238
+ throw new WC_Stripe_Exception(
239
+ 'Failed to process renewal for order ' . $renewal_order->get_id() . '. Stripe customer id is missing in the order',
240
+ __( 'Customer not found', 'woocommerce-gateway-stripe' )
241
+ );
242
}
243
244
WC_Stripe_Logger::log( "Info: Begin processing subscription payment for order {$order_id} for the amount of {$amount}" );
398
if ( $this->id === $payment_method_id ) {
399
400
if ( ! isset( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) || empty( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) ) {
401
+
402
+ // Allow empty stripe customer id during subscription renewal. It will be added when processing payment if required.
403
+ if ( ! isset( $_POST['wc_order_action'] ) || 'wcs_process_renewal' !== $_POST['wc_order_action'] ) {
404
+ throw new Exception( __( 'A "Stripe Customer ID" value is required.', 'woocommerce-gateway-stripe' ) );
405
+ }
406
} elseif ( 0 !== strpos( $payment_meta['post_meta']['_stripe_customer_id']['value'], 'cus_' ) ) {
407
throw new Exception( __( 'Invalid customer ID. A valid "Stripe Customer ID" must begin with "cus_".', 'woocommerce-gateway-stripe' ) );
408
}
includes/compat/class-wc-stripe-subs-compat.php CHANGED
@@ -221,11 +221,16 @@ class WC_Stripe_Subs_Compat extends WC_Gateway_Stripe {
221
try {
222
if ( $amount * 100 < WC_Stripe_Helper::get_minimum_amount() ) {
223
/* translators: minimum amount */
224
- return new WP_Error( 'stripe_error', sprintf( __( 'Sorry, the minimum allowed order total is %1$s to use this payment method.', 'woocommerce-gateway-stripe' ), wc_price( WC_Stripe_Helper::get_minimum_amount() / 100 ) ) );
225
}
226
227
$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $renewal_order->id : $renewal_order->get_id();
228
229
230
// Unlike regular off-session subscription payments, early renewals are treated as on-session payments, involving the customer.
231
if ( isset( $_REQUEST['process_early_renewal'] ) ) { // wpcs: csrf ok.
@@ -267,7 +272,10 @@ class WC_Stripe_Subs_Compat extends WC_Gateway_Stripe {
267
$source_object = $prepared_source->source_object;
268
269
if ( ! $prepared_source->customer ) {
270
- return new WP_Error( 'stripe_error', __( 'Customer not found', 'woocommerce-gateway-stripe' ) );
271
}
272
273
WC_Stripe_Logger::log( "Info: Begin processing subscription payment for order {$order_id} for the amount of {$amount}" );
@@ -487,7 +495,11 @@ class WC_Stripe_Subs_Compat extends WC_Gateway_Stripe {
487
if ( $this->id === $payment_method_id ) {
488
489
if ( ! isset( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) || empty( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) ) {
490
- throw new Exception( __( 'A "Stripe Customer ID" value is required.', 'woocommerce-gateway-stripe' ) );
491
} elseif ( 0 !== strpos( $payment_meta['post_meta']['_stripe_customer_id']['value'], 'cus_' ) ) {
492
throw new Exception( __( 'Invalid customer ID. A valid "Stripe Customer ID" must begin with "cus_".', 'woocommerce-gateway-stripe' ) );
493
}
221
try {
222
if ( $amount * 100 < WC_Stripe_Helper::get_minimum_amount() ) {
223
/* translators: minimum amount */
224
+ $message = sprintf( __( 'Sorry, the minimum allowed order total is %1$s to use this payment method.', 'woocommerce-gateway-stripe' ), wc_price( WC_Stripe_Helper::get_minimum_amount() / 100 ) );
225
+ throw new WC_Stripe_Exception(
226
+ 'Error while processing renewal order ' . $renewal_order->get_id() . ' : ' . $message,
227
+ $message
228
+ );
229
}
230
231
$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $renewal_order->id : $renewal_order->get_id();
232
233
+ $this->ensure_subscription_has_customer_id( $order_id );
234
235
// Unlike regular off-session subscription payments, early renewals are treated as on-session payments, involving the customer.
236
if ( isset( $_REQUEST['process_early_renewal'] ) ) { // wpcs: csrf ok.
272
$source_object = $prepared_source->source_object;
273
274
if ( ! $prepared_source->customer ) {
275
+ throw new WC_Stripe_Exception(
276
+ 'Failed to process renewal for order ' . $renewal_order->get_id() . '. Stripe customer id is missing in the order',
277
+ __( 'Customer not found', 'woocommerce-gateway-stripe' )
278
+ );
279
}
280
281
WC_Stripe_Logger::log( "Info: Begin processing subscription payment for order {$order_id} for the amount of {$amount}" );
495
if ( $this->id === $payment_method_id ) {
496
497
if ( ! isset( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) || empty( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) ) {
498
+
499
+ // Allow empty stripe customer id during subscription renewal. It will be added when processing payment if required.
500
+ if ( ! isset( $_POST['wc_order_action'] ) || 'wcs_process_renewal' !== $_POST['wc_order_action'] ) {
501
+ throw new Exception( __( 'A "Stripe Customer ID" value is required.', 'woocommerce-gateway-stripe' ) );
502
+ }
503
} elseif ( 0 !== strpos( $payment_meta['post_meta']['_stripe_customer_id']['value'], 'cus_' ) ) {
504
throw new Exception( __( 'Invalid customer ID. A valid "Stripe Customer ID" must begin with "cus_".', 'woocommerce-gateway-stripe' ) );
505
}
includes/payment-methods/class-wc-stripe-payment-request.php CHANGED
@@ -241,6 +241,21 @@ class WC_Stripe_Payment_Request {
241
242
$product = wc_get_product( $post->ID );
243
244
$data = array();
245
$items = array();
246
@@ -815,7 +830,7 @@ class WC_Stripe_Payment_Request {
815
}
816
817
if ( 'variable' === ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
818
- $attributes = array_map( 'wc_clean', $_POST['attributes'] );
819
820
if ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ) {
821
$variation_id = $product->get_matching_variation( $attributes );
@@ -827,8 +842,6 @@ class WC_Stripe_Payment_Request {
827
if ( ! empty( $variation_id ) ) {
828
$product = wc_get_product( $variation_id );
829
}
830
- } elseif ( 'simple' === ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $product->product_type : $product->get_type() ) ) {
831
- $product = wc_get_product( $product_id );
832
}
833
834
// Force quantity to 1 if sold individually and check for existing item in cart.
@@ -918,7 +931,7 @@ class WC_Stripe_Payment_Request {
918
WC()->cart->empty_cart();
919
920
if ( ( 'variable' === $product_type || 'variable-subscription' === $product_type ) && isset( $_POST['attributes'] ) ) {
921
- $attributes = array_map( 'wc_clean', $_POST['attributes'] );
922
923
if ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ) {
924
$variation_id = $product->get_matching_variation( $attributes );
241
242
$product = wc_get_product( $post->ID );
243
244
+ if ( 'variable' === ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $product->product_type : $product->get_type() ) ) {
245
+ $attributes = wc_clean( wp_unslash( $_GET ) );
246
+
247
+ if ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ) {
248
+ $variation_id = $product->get_matching_variation( $attributes );
249
+ } else {
250
+ $data_store = WC_Data_Store::load( 'product' );
251
+ $variation_id = $data_store->find_matching_product_variation( $product, $attributes );
252
+ }
253
+
254
+ if ( ! empty( $variation_id ) ) {
255
+ $product = wc_get_product( $variation_id );
256
+ }
257
+ }
258
+
259
$data = array();
260
$items = array();
261
830
}
831
832
if ( 'variable' === ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
833
+ $attributes = wc_clean( wp_unslash( $_POST['attributes'] ) );
834
835
if ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ) {
836
$variation_id = $product->get_matching_variation( $attributes );
842
if ( ! empty( $variation_id ) ) {
843
$product = wc_get_product( $variation_id );
844
}
845
}
846
847
// Force quantity to 1 if sold individually and check for existing item in cart.
931
WC()->cart->empty_cart();
932
933
if ( ( 'variable' === $product_type || 'variable-subscription' === $product_type ) && isset( $_POST['attributes'] ) ) {
934
+ $attributes = wc_clean( wp_unslash( $_POST['attributes'] ) );
935
936
if ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ) {
937
$variation_id = $product->get_matching_variation( $attributes );
languages/woocommerce-gateway-stripe.pot CHANGED
@@ -2,17 +2,17 @@
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 4.3.1\n"
6
"Report-Msgid-Bugs-To: "
7
"https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
8
- "POT-Creation-Date: 2020-02-14 07:56:25+00:00\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=utf-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
13
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
"Language-Team: LANGUAGE <LL@li.org>\n"
15
- "X-Generator: node-wp-i18n 1.2.1\n"
16
17
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:24
18
#. translators: 1) webhook url
@@ -125,18 +125,26 @@ msgid ""
125
"plugin is %1$s. You are running %2$s."
126
msgstr ""
127
128
- #: includes/admin/class-wc-stripe-admin-notices.php:163
129
msgid "WooCommerce Stripe - cURL is not installed."
130
msgstr ""
131
132
- #: includes/admin/class-wc-stripe-admin-notices.php:173
133
#. translators: 1) link
134
msgid ""
135
"Stripe is almost ready. To get started, <a href=\"%s\">set your Stripe "
136
"account keys</a>."
137
msgstr ""
138
139
- #: includes/admin/class-wc-stripe-admin-notices.php:184
140
#. translators: 1) link
141
msgid ""
142
"Stripe is in test mode however your test keys may not be valid. Test keys "
@@ -144,7 +152,7 @@ msgid ""
144
"<a href=\"%s\">set your Stripe account keys</a>."
145
msgstr ""
146
147
- #: includes/admin/class-wc-stripe-admin-notices.php:193
148
#. translators: 1) link
149
msgid ""
150
"Stripe is in live mode however your test keys may not be valid. Live keys "
@@ -152,7 +160,7 @@ msgid ""
152
"<a href=\"%s\">set your Stripe account keys</a>."
153
msgstr ""
154
155
- #: includes/admin/class-wc-stripe-admin-notices.php:202
156
#. translators: 1) link
157
msgid ""
158
"Stripe is enabled, but a SSL certificate is not detected. Your checkout may "
@@ -160,13 +168,13 @@ msgid ""
160
"target=\"_blank\">SSL certificate</a>"
161
msgstr ""
162
163
- #: includes/admin/class-wc-stripe-admin-notices.php:207
164
msgid ""
165
"Stripe is now ready for Strong Customer Authentication (SCA) and 3D Secure "
166
"2! <a href=\"%1$s\" target=\"_blank\">Read about SCA</a>"
167
msgstr ""
168
169
- #: includes/admin/class-wc-stripe-admin-notices.php:212
170
#. translators: %s is a the URL for the link.
171
msgid ""
172
"The public and/or secret keys for the Stripe gateway have been changed. "
@@ -174,16 +182,16 @@ msgid ""
174
"<a href=\"%s\" target=\"_blank\">Click here to learn more</a>."
175
msgstr ""
176
177
- #: includes/admin/class-wc-stripe-admin-notices.php:235
178
#. translators: %1$s Payment method, %2$s List of supported currencies
179
msgid "%1$s is enabled - it requires store currency to be set to %2$s"
180
msgstr ""
181
182
- #: includes/admin/class-wc-stripe-admin-notices.php:249
183
msgid "Action failed. Please refresh the page and retry."
184
msgstr ""
185
186
- #: includes/admin/class-wc-stripe-admin-notices.php:253
187
msgid "Cheatin&#8217; huh?"
188
msgstr ""
189
@@ -218,9 +226,9 @@ msgid "Retains any Stripe data such as Stripe customer ID, source ID."
218
msgstr ""
219
220
#: includes/admin/class-wc-stripe-privacy.php:41
221
- #: includes/compat/class-wc-stripe-sepa-subs-compat.php:469
222
- #: includes/compat/class-wc-stripe-subs-compat.php:567
223
- #: includes/compat/class-wc-stripe-subs-compat.php:582
224
msgid "N/A"
225
msgstr ""
226
@@ -853,18 +861,18 @@ msgstr ""
853
msgid "Stripe Payout:"
854
msgstr ""
855
856
- #: includes/class-wc-gateway-stripe.php:823
857
#: includes/class-wc-stripe-order-handler.php:162
858
#: includes/class-wc-stripe-webhook-handler.php:238
859
- #: includes/compat/class-wc-stripe-sepa-subs-compat.php:269
860
- #: includes/compat/class-wc-stripe-subs-compat.php:309
861
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:373
862
msgid ""
863
"Sorry, we are unable to process your payment at this time. Please retry "
864
"later."
865
msgstr ""
866
867
- #: includes/class-wc-gateway-stripe.php:876
868
msgid ""
869
"Almost there!\n"
870
"\n"
@@ -872,14 +880,14 @@ msgid ""
872
"done is for you to authorize the payment with your bank."
873
msgstr ""
874
875
- #: includes/class-wc-gateway-stripe.php:1117
876
#: includes/class-wc-stripe-webhook-handler.php:685
877
#: includes/class-wc-stripe-webhook-handler.php:724
878
#. translators: 1) The error message that was received from Stripe.
879
msgid "Stripe SCA authentication failed. Reason: %s"
880
msgstr ""
881
882
- #: includes/class-wc-gateway-stripe.php:1118
883
msgid "Stripe SCA authentication failed."
884
msgstr ""
885
@@ -922,23 +930,11 @@ msgstr ""
922
msgid "Name: %1$s %2$s, Guest"
923
msgstr ""
924
925
- #: includes/class-wc-stripe-customer.php:179
926
msgid "Attempting to update a Stripe customer without a customer ID."
927
msgstr ""
928
929
- #: includes/class-wc-stripe-customer.php:197
930
- #. Translators: %s is a message, which states that no such customer exists,
931
- #. without a full stop at the end.
932
- msgid "%s. Was the customer created in live mode? "
933
- msgstr ""
934
-
935
- #: includes/class-wc-stripe-customer.php:199
936
- #. Translators: %s is a message, which states that no such customer exists,
937
- #. without a full stop at the end.
938
- msgid "%s. Was the customer created in test mode? "
939
- msgstr ""
940
-
941
- #: includes/class-wc-stripe-customer.php:262
942
msgid "Unable to add payment source."
943
msgstr ""
944
@@ -1172,8 +1168,8 @@ msgid "Unable to store payment details. Please try again."
1172
msgstr ""
1173
1174
#: includes/compat/class-wc-stripe-pre-orders-compat.php:121
1175
- #: includes/compat/class-wc-stripe-subs-compat.php:341
1176
- #: includes/compat/class-wc-stripe-subs-compat.php:646
1177
msgid "Stripe charge awaiting authentication by user: %s."
1178
msgstr ""
1179
@@ -1187,57 +1183,57 @@ msgstr ""
1187
msgid "Update the Payment Method used for all of my active subscriptions."
1188
msgstr ""
1189
1190
- #: includes/compat/class-wc-stripe-sepa-subs-compat.php:232
1191
- #: includes/compat/class-wc-stripe-subs-compat.php:270
1192
msgid "Customer not found"
1193
msgstr ""
1194
1195
- #: includes/compat/class-wc-stripe-sepa-subs-compat.php:392
1196
- #: includes/compat/class-wc-stripe-subs-compat.php:490
1197
#. translators: error message
1198
msgid "A \"Stripe Customer ID\" value is required."
1199
msgstr ""
1200
1201
- #: includes/compat/class-wc-stripe-sepa-subs-compat.php:394
1202
- #: includes/compat/class-wc-stripe-subs-compat.php:492
1203
msgid ""
1204
"Invalid customer ID. A valid \"Stripe Customer ID\" must begin with "
1205
"\"cus_\"."
1206
msgstr ""
1207
1208
- #: includes/compat/class-wc-stripe-sepa-subs-compat.php:403
1209
- #: includes/compat/class-wc-stripe-subs-compat.php:501
1210
msgid ""
1211
"Invalid source ID. A valid source \"Stripe Source ID\" must begin with "
1212
"\"src_\" or \"card_\"."
1213
msgstr ""
1214
1215
- #: includes/compat/class-wc-stripe-sepa-subs-compat.php:476
1216
#. translators: 1) last 4 digits of SEPA Direct Debit
1217
msgid "Via SEPA Direct Debit ending in %1$s"
1218
msgstr ""
1219
1220
- #: includes/compat/class-wc-stripe-subs-compat.php:333
1221
msgid "This transaction requires authentication."
1222
msgstr ""
1223
1224
- #: includes/compat/class-wc-stripe-subs-compat.php:582
1225
#. translators: 1) card brand 2) last 4 digits
1226
msgid "Via %1$s card ending in %2$s"
1227
msgstr ""
1228
1229
- #: includes/compat/class-wc-stripe-subs-compat.php:679
1230
msgid "Your early renewal order was successful."
1231
msgstr ""
1232
1233
- #: includes/compat/class-wc-stripe-subs-compat.php:692
1234
msgid ""
1235
"Payment authorization for the renewal order was unsuccessful, please try "
1236
"again."
1237
msgstr ""
1238
1239
#: includes/payment-methods/class-wc-gateway-stripe-alipay.php:60
1240
- #: woocommerce-gateway-stripe.php:256
1241
msgid "Stripe Alipay"
1242
msgstr ""
1243
@@ -1266,27 +1262,27 @@ msgid "Add Payment"
1266
msgstr ""
1267
1268
#: includes/payment-methods/class-wc-gateway-stripe-bancontact.php:60
1269
- #: woocommerce-gateway-stripe.php:250
1270
msgid "Stripe Bancontact"
1271
msgstr ""
1272
1273
#: includes/payment-methods/class-wc-gateway-stripe-eps.php:60
1274
- #: woocommerce-gateway-stripe.php:253
1275
msgid "Stripe EPS"
1276
msgstr ""
1277
1278
#: includes/payment-methods/class-wc-gateway-stripe-giropay.php:60
1279
- #: woocommerce-gateway-stripe.php:252
1280
msgid "Stripe Giropay"
1281
msgstr ""
1282
1283
#: includes/payment-methods/class-wc-gateway-stripe-ideal.php:60
1284
- #: woocommerce-gateway-stripe.php:254
1285
msgid "Stripe iDeal"
1286
msgstr ""
1287
1288
#: includes/payment-methods/class-wc-gateway-stripe-multibanco.php:60
1289
- #: woocommerce-gateway-stripe.php:258
1290
msgid "Stripe Multibanco"
1291
msgstr ""
1292
@@ -1315,12 +1311,12 @@ msgid "Awaiting Multibanco payment"
1315
msgstr ""
1316
1317
#: includes/payment-methods/class-wc-gateway-stripe-p24.php:60
1318
- #: woocommerce-gateway-stripe.php:255
1319
msgid "Stripe P24"
1320
msgstr ""
1321
1322
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:75
1323
- #: woocommerce-gateway-stripe.php:257
1324
msgid "Stripe SEPA Direct Debit"
1325
msgstr ""
1326
@@ -1347,61 +1343,61 @@ msgid ""
1347
msgstr ""
1348
1349
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:60
1350
- #: woocommerce-gateway-stripe.php:251
1351
msgid "Stripe SOFORT"
1352
msgstr ""
1353
1354
- #: includes/payment-methods/class-wc-stripe-payment-request.php:254
1355
- #: includes/payment-methods/class-wc-stripe-payment-request.php:858
1356
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1157
1357
msgid "Tax"
1358
msgstr ""
1359
1360
- #: includes/payment-methods/class-wc-stripe-payment-request.php:262
1361
- #: includes/payment-methods/class-wc-stripe-payment-request.php:866
1362
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1164
1363
msgid "Shipping"
1364
msgstr ""
1365
1366
- #: includes/payment-methods/class-wc-stripe-payment-request.php:269
1367
- #: includes/payment-methods/class-wc-stripe-payment-request.php:873
1368
msgid "Pending"
1369
msgstr ""
1370
1371
- #: includes/payment-methods/class-wc-stripe-payment-request.php:486
1372
msgid "Sorry, we're not accepting prepaid cards at this time."
1373
msgstr ""
1374
1375
- #: includes/payment-methods/class-wc-stripe-payment-request.php:488
1376
#. translators: Do not translate the [option] placeholder
1377
msgid "Unknown shipping option \"[option]\"."
1378
msgstr ""
1379
1380
- #: includes/payment-methods/class-wc-stripe-payment-request.php:591
1381
msgid "OR"
1382
msgstr ""
1383
1384
- #: includes/payment-methods/class-wc-stripe-payment-request.php:731
1385
- #: includes/payment-methods/class-wc-stripe-payment-request.php:744
1386
msgid "Unable to find shipping method for address."
1387
msgstr ""
1388
1389
- #: includes/payment-methods/class-wc-stripe-payment-request.php:814
1390
msgid "Product with the ID (%d) cannot be found."
1391
msgstr ""
1392
1393
- #: includes/payment-methods/class-wc-stripe-payment-request.php:841
1394
#. translators: 1: product name 2: quantity in stock
1395
msgid ""
1396
"You cannot add that amount of \"%1$s\"; to the cart because there is not "
1397
"enough stock (%2$s remaining)."
1398
msgstr ""
1399
1400
- #: includes/payment-methods/class-wc-stripe-payment-request.php:996
1401
msgid "Empty cart"
1402
msgstr ""
1403
1404
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1171
1405
msgid "Discount"
1406
msgstr ""
1407
@@ -1429,15 +1425,15 @@ msgid ""
1429
"here."
1430
msgstr ""
1431
1432
- #: woocommerce-gateway-stripe.php:197
1433
msgid "Settings"
1434
msgstr ""
1435
1436
- #: woocommerce-gateway-stripe.php:198
1437
msgid "Docs"
1438
msgstr ""
1439
1440
- #: woocommerce-gateway-stripe.php:199
1441
msgid "Support"
1442
msgstr ""
1443
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 4.3.3\n"
6
"Report-Msgid-Bugs-To: "
7
"https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
8
+ "POT-Creation-Date: 2020-04-08 11:14:19+00:00\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=utf-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
13
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
"Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "X-Generator: node-wp-i18n 1.2.3\n"
16
17
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:24
18
#. translators: 1) webhook url
125
"plugin is %1$s. You are running %2$s."
126
msgstr ""
127
128
+ #: includes/admin/class-wc-stripe-admin-notices.php:160
129
+ #. translators: 1) int version 2) int version
130
+ msgid ""
131
+ "WooCommerce Stripe - This is the last version of the plugin compatible with "
132
+ "WooCommerce %1$s. All furture versions of the plugin will require "
133
+ "WooCommerce %2$s or greater."
134
+ msgstr ""
135
+
136
+ #: includes/admin/class-wc-stripe-admin-notices.php:167
137
msgid "WooCommerce Stripe - cURL is not installed."
138
msgstr ""
139
140
+ #: includes/admin/class-wc-stripe-admin-notices.php:177
141
#. translators: 1) link
142
msgid ""
143
"Stripe is almost ready. To get started, <a href=\"%s\">set your Stripe "
144
"account keys</a>."
145
msgstr ""
146
147
+ #: includes/admin/class-wc-stripe-admin-notices.php:188
148
#. translators: 1) link
149
msgid ""
150
"Stripe is in test mode however your test keys may not be valid. Test keys "
152
"<a href=\"%s\">set your Stripe account keys</a>."
153
msgstr ""
154
155
+ #: includes/admin/class-wc-stripe-admin-notices.php:197
156
#. translators: 1) link
157
msgid ""
158
"Stripe is in live mode however your test keys may not be valid. Live keys "
160
"<a href=\"%s\">set your Stripe account keys</a>."
161
msgstr ""
162
163
+ #: includes/admin/class-wc-stripe-admin-notices.php:206
164
#. translators: 1) link
165
msgid ""
166
"Stripe is enabled, but a SSL certificate is not detected. Your checkout may "
168
"target=\"_blank\">SSL certificate</a>"
169
msgstr ""
170
171
+ #: includes/admin/class-wc-stripe-admin-notices.php:211
172
msgid ""
173
"Stripe is now ready for Strong Customer Authentication (SCA) and 3D Secure "
174
"2! <a href=\"%1$s\" target=\"_blank\">Read about SCA</a>"
175
msgstr ""
176
177
+ #: includes/admin/class-wc-stripe-admin-notices.php:216
178
#. translators: %s is a the URL for the link.
179
msgid ""
180
"The public and/or secret keys for the Stripe gateway have been changed. "
182
"<a href=\"%s\" target=\"_blank\">Click here to learn more</a>."
183
msgstr ""
184
185
+ #: includes/admin/class-wc-stripe-admin-notices.php:239
186
#. translators: %1$s Payment method, %2$s List of supported currencies
187
msgid "%1$s is enabled - it requires store currency to be set to %2$s"
188
msgstr ""
189
190
+ #: includes/admin/class-wc-stripe-admin-notices.php:253
191
msgid "Action failed. Please refresh the page and retry."
192
msgstr ""
193
194
+ #: includes/admin/class-wc-stripe-admin-notices.php:257
195
msgid "Cheatin&#8217; huh?"
196
msgstr ""
197
226
msgstr ""
227
228
#: includes/admin/class-wc-stripe-privacy.php:41
229
+ #: includes/compat/class-wc-stripe-sepa-subs-compat.php:482
230
+ #: includes/compat/class-wc-stripe-subs-compat.php:579
231
+ #: includes/compat/class-wc-stripe-subs-compat.php:594
232
msgid "N/A"
233
msgstr ""
234
861
msgid "Stripe Payout:"
862
msgstr ""
863
864
+ #: includes/class-wc-gateway-stripe.php:838
865
#: includes/class-wc-stripe-order-handler.php:162
866
#: includes/class-wc-stripe-webhook-handler.php:238
867
+ #: includes/compat/class-wc-stripe-sepa-subs-compat.php:278
868
+ #: includes/compat/class-wc-stripe-subs-compat.php:317
869
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:373
870
msgid ""
871
"Sorry, we are unable to process your payment at this time. Please retry "
872
"later."
873
msgstr ""
874
875
+ #: includes/class-wc-gateway-stripe.php:891
876
msgid ""
877
"Almost there!\n"
878
"\n"
880
"done is for you to authorize the payment with your bank."
881
msgstr ""
882
883
+ #: includes/class-wc-gateway-stripe.php:1132
884
#: includes/class-wc-stripe-webhook-handler.php:685
885
#: includes/class-wc-stripe-webhook-handler.php:724
886
#. translators: 1) The error message that was received from Stripe.
887
msgid "Stripe SCA authentication failed. Reason: %s"
888
msgstr ""
889
890
+ #: includes/class-wc-gateway-stripe.php:1133
891
msgid "Stripe SCA authentication failed."
892
msgstr ""
893
930
msgid "Name: %1$s %2$s, Guest"
931
msgstr ""
932
933
+ #: includes/class-wc-stripe-customer.php:184
934
msgid "Attempting to update a Stripe customer without a customer ID."
935
msgstr ""
936
937
+ #: includes/class-wc-stripe-customer.php:255
938
msgid "Unable to add payment source."
939
msgstr ""
940
1168
msgstr ""
1169
1170
#: includes/compat/class-wc-stripe-pre-orders-compat.php:121
1171
+ #: includes/compat/class-wc-stripe-subs-compat.php:349
1172
+ #: includes/compat/class-wc-stripe-subs-compat.php:658
1173
msgid "Stripe charge awaiting authentication by user: %s."
1174
msgstr ""
1175
1183
msgid "Update the Payment Method used for all of my active subscriptions."
1184
msgstr ""
1185
1186
+ #: includes/compat/class-wc-stripe-sepa-subs-compat.php:240
1187
+ #: includes/compat/class-wc-stripe-subs-compat.php:277
1188
msgid "Customer not found"
1189
msgstr ""
1190
1191
+ #: includes/compat/class-wc-stripe-sepa-subs-compat.php:404
1192
+ #: includes/compat/class-wc-stripe-subs-compat.php:501
1193
#. translators: error message
1194
msgid "A \"Stripe Customer ID\" value is required."
1195
msgstr ""
1196
1197
+ #: includes/compat/class-wc-stripe-sepa-subs-compat.php:407
1198
+ #: includes/compat/class-wc-stripe-subs-compat.php:504
1199
msgid ""
1200
"Invalid customer ID. A valid \"Stripe Customer ID\" must begin with "
1201
"\"cus_\"."
1202
msgstr ""
1203
1204
+ #: includes/compat/class-wc-stripe-sepa-subs-compat.php:416
1205
+ #: includes/compat/class-wc-stripe-subs-compat.php:513
1206
msgid ""
1207
"Invalid source ID. A valid source \"Stripe Source ID\" must begin with "
1208
"\"src_\" or \"card_\"."
1209
msgstr ""
1210
1211
+ #: includes/compat/class-wc-stripe-sepa-subs-compat.php:489
1212
#. translators: 1) last 4 digits of SEPA Direct Debit
1213
msgid "Via SEPA Direct Debit ending in %1$s"
1214
msgstr ""
1215
1216
+ #: includes/compat/class-wc-stripe-subs-compat.php:341
1217
msgid "This transaction requires authentication."
1218
msgstr ""
1219
1220
+ #: includes/compat/class-wc-stripe-subs-compat.php:594
1221
#. translators: 1) card brand 2) last 4 digits
1222
msgid "Via %1$s card ending in %2$s"
1223
msgstr ""
1224
1225
+ #: includes/compat/class-wc-stripe-subs-compat.php:691
1226
msgid "Your early renewal order was successful."
1227
msgstr ""
1228
1229
+ #: includes/compat/class-wc-stripe-subs-compat.php:704
1230
msgid ""
1231
"Payment authorization for the renewal order was unsuccessful, please try "
1232
"again."
1233
msgstr ""
1234
1235
#: includes/payment-methods/class-wc-gateway-stripe-alipay.php:60
1236
+ #: woocommerce-gateway-stripe.php:257
1237
msgid "Stripe Alipay"
1238
msgstr ""
1239
1262
msgstr ""
1263
1264
#: includes/payment-methods/class-wc-gateway-stripe-bancontact.php:60
1265
+ #: woocommerce-gateway-stripe.php:251
1266
msgid "Stripe Bancontact"
1267
msgstr ""
1268
1269
#: includes/payment-methods/class-wc-gateway-stripe-eps.php:60
1270
+ #: woocommerce-gateway-stripe.php:254
1271
msgid "Stripe EPS"
1272
msgstr ""
1273
1274
#: includes/payment-methods/class-wc-gateway-stripe-giropay.php:60
1275
+ #: woocommerce-gateway-stripe.php:253
1276
msgid "Stripe Giropay"
1277
msgstr ""
1278
1279
#: includes/payment-methods/class-wc-gateway-stripe-ideal.php:60
1280
+ #: woocommerce-gateway-stripe.php:255
1281
msgid "Stripe iDeal"
1282
msgstr ""
1283
1284
#: includes/payment-methods/class-wc-gateway-stripe-multibanco.php:60
1285
+ #: woocommerce-gateway-stripe.php:259
1286
msgid "Stripe Multibanco"
1287
msgstr ""
1288
1311
msgstr ""
1312
1313
#: includes/payment-methods/class-wc-gateway-stripe-p24.php:60
1314
+ #: woocommerce-gateway-stripe.php:256
1315
msgid "Stripe P24"
1316
msgstr ""
1317
1318
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:75
1319
+ #: woocommerce-gateway-stripe.php:258
1320
msgid "Stripe SEPA Direct Debit"
1321
msgstr ""
1322
1343
msgstr ""
1344
1345
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:60
1346
+ #: woocommerce-gateway-stripe.php:252
1347
msgid "Stripe SOFORT"
1348
msgstr ""
1349
1350
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:269
1351
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:871
1352
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1170
1353
msgid "Tax"
1354
msgstr ""
1355
1356
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:277
1357
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:879
1358
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1177
1359
msgid "Shipping"
1360
msgstr ""
1361
1362
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:284
1363
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:886
1364
msgid "Pending"
1365
msgstr ""
1366
1367
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:501
1368
msgid "Sorry, we're not accepting prepaid cards at this time."
1369
msgstr ""
1370
1371
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:503
1372
#. translators: Do not translate the [option] placeholder
1373
msgid "Unknown shipping option \"[option]\"."
1374
msgstr ""
1375
1376
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:606
1377
msgid "OR"
1378
msgstr ""
1379
1380
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:746
1381
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:759
1382
msgid "Unable to find shipping method for address."
1383
msgstr ""
1384
1385
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:829
1386
msgid "Product with the ID (%d) cannot be found."
1387
msgstr ""
1388
1389
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:854
1390
#. translators: 1: product name 2: quantity in stock
1391
msgid ""
1392
"You cannot add that amount of \"%1$s\"; to the cart because there is not "
1393
"enough stock (%2$s remaining)."
1394
msgstr ""
1395
1396
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1009
1397
msgid "Empty cart"
1398
msgstr ""
1399
1400
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1184
1401
msgid "Discount"
1402
msgstr ""
1403
1425
"here."
1426
msgstr ""
1427
1428
+ #: woocommerce-gateway-stripe.php:198
1429
msgid "Settings"
1430
msgstr ""
1431
1432
+ #: woocommerce-gateway-stripe.php:199
1433
msgid "Docs"
1434
msgstr ""
1435
1436
+ #: woocommerce-gateway-stripe.php:200
1437
msgid "Support"
1438
msgstr ""
1439
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
Contributors: automattic, royho, akeda, mattyza, bor0, woothemes
3
Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort, bancontact, alipay, giropay, ideal, p24, woocommerce, automattic
4
Requires at least: 4.4
5
- Tested up to: 5.3.2
6
Requires PHP: 5.6
7
- Stable tag: 4.3.2
8
License: GPLv3
9
License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
Attributions: thorsten-stripe
@@ -113,6 +113,14 @@ If you get stuck, you can ask for help in the Plugin Forum.
113
114
== Changelog ==
115
116
= 4.3.2 2020-02-17 =
117
* Fix - Add compatibility to payment request buttons with some of the WooCommerce Product Add-ons on the product page
118
* Fix - Improved compatibility for free orders with other extensions
2
Contributors: automattic, royho, akeda, mattyza, bor0, woothemes
3
Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort, bancontact, alipay, giropay, ideal, p24, woocommerce, automattic
4
Requires at least: 4.4
5
+ Tested up to: 5.4
6
Requires PHP: 5.6
7
+ Stable tag: 4.3.3
8
License: GPLv3
9
License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
Attributions: thorsten-stripe
113
114
== Changelog ==
115
116
+ = 4.3.3 2020-04-08 =
117
+ * Fix - Fix Payment Request issue when product attribute has quotes
118
+ * Fix - Fix "no such customer" error on checkout after the keys have been changed
119
+ * Add - Add alert for end of support WC < 3.0 in future releases
120
+ * Fix - Fix crash when used with WooCommerce Subscriptions <2.6
121
+ * Fix - Add missing customer ID to subscriptions before processing payment
122
+ * Fix - Fix transactions failing with trailing slash
123
+
124
= 4.3.2 2020-02-17 =
125
* Fix - Add compatibility to payment request buttons with some of the WooCommerce Product Add-ons on the product page
126
* Fix - Improved compatibility for free orders with other extensions
woocommerce-gateway-stripe.php CHANGED
@@ -5,11 +5,11 @@
5
* Description: Take credit card payments on your store using Stripe.
6
* Author: WooCommerce
7
* Author URI: https://woocommerce.com/
8
- * Version: 4.3.2
9
* Requires at least: 4.4
10
- * Tested up to: 5.3.2
11
* WC requires at least: 2.6
12
- * WC tested up to: 3.9.2
13
* Text Domain: woocommerce-gateway-stripe
14
* Domain Path: /languages
15
*
@@ -46,9 +46,10 @@ function woocommerce_gateway_stripe_init() {
46
/**
47
* Required minimums and constants
48
*/
49
- define( 'WC_STRIPE_VERSION', '4.3.2' );
50
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
51
define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
52
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
53
define( 'WC_STRIPE_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
54
define( 'WC_STRIPE_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
5
* Description: Take credit card payments on your store using Stripe.
6
* Author: WooCommerce
7
* Author URI: https://woocommerce.com/
8
+ * Version: 4.3.3
9
* Requires at least: 4.4
10
+ * Tested up to: 5.4
11
* WC requires at least: 2.6
12
+ * WC tested up to: 4.0
13
* Text Domain: woocommerce-gateway-stripe
14
* Domain Path: /languages
15
*
46
/**
47
* Required minimums and constants
48
*/
49
+ define( 'WC_STRIPE_VERSION', '4.3.3' );
50
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
51
define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
52
+ define( 'WC_STRIPE_FUTURE_MIN_WC_VER', '3.0' );
53
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
54
define( 'WC_STRIPE_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
55
define( 'WC_STRIPE_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );