WooCommerce Stripe Payment Gateway - Version 4.1.15

Version Description

  • 2019-03-12 =
  • Fix - Prevent canceled webhook from processing non Stripe payments.
  • Fix - "Retain Stripe Data" setting placement on WooCommerce settings page.
  • Tweak - Stripe API version updated to support 2019-02-19.

See changelog for all versions.

=

Download this release

Release Info

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

Code changes from version 4.1.14 to 4.1.15

assets/css/stripe-styles.scss DELETED
@@ -1,60 +0,0 @@
1
- .wc-stripe-elements-field, .wc-stripe-iban-element-field { border:1px solid #ddd; margin:5px 0; padding:5px; background-color:#fff; outline:0; }
2
- #payment .methods li.woocommerce-SavedPaymentMethods-token label { display: inline; }
3
- #payment .methods li.woocommerce-SavedPaymentMethods-new label { display: inline; }
4
-
5
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-icon,
6
- #add_payment_method #payment ul.payment_methods li img.stripe-icon { max-width: 40px; padding-left: 3px; margin: 0; }
7
-
8
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-bancontact-icon,
9
- #add_payment_method #payment ul.payment_methods li img.stripe-bancontact-icon { max-height: 65px; max-width: 45px; }
10
-
11
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-ideal-icon,
12
- #add_payment_method #payment ul.payment_methods li img.stripe-ideal-icon { max-height: 35px; }
13
-
14
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-p24-icon,
15
- #add_payment_method #payment ul.payment_methods li img.stripe-p24-icon { max-width: 65px; }
16
-
17
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-alipay-icon,
18
- #add_payment_method #payment ul.payment_methods li img.stripe-alipay-icon { max-width: 50px; }
19
-
20
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-sofort-icon,
21
- #add_payment_method #payment ul.payment_methods li img.stripe-sofort-icon { max-width: 55px; }
22
-
23
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-sepa-icon,
24
- #add_payment_method #payment ul.payment_methods li img.stripe-sepa-icon { max-width: 50px; }
25
-
26
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-multibanco-icon,
27
- #add_payment_method #payment ul.payment_methods li img.stripe-multibanco-icon { max-height: 30px; }
28
-
29
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-eps-icon,
30
- #add_payment_method #payment ul.payment_methods li img.stripe-eps-icon { max-height: 30px; }
31
-
32
- .woocommerce-checkout #payment ul.payment_methods li img.stripe-giropay-icon,
33
- #add_payment_method #payment ul.payment_methods li img.stripe-giropay-icon { max-width: 50px; }
34
-
35
- .woocommerce-checkout #payment ul.payment_methods li .stripe-credit-card-brand,
36
- #add_payment_method #payment ul.payment_methods li .stripe-credit-card-brand { position: absolute; top: 50%; margin-top: -10px; right: 10px; background: no-repeat url( '../images/credit-card.svg' ); display: block; width: 30px; height: 24px; }
37
-
38
- .woocommerce-checkout #payment ul.payment_methods li .stripe-visa-brand,
39
- #add_payment_method #payment ul.payment_methods li .stripe-visa-brand { position: absolute; top: 50%; margin-top: -10px; right: 10px; background: no-repeat url( '../images/visa.svg' ); display: block; width: 30px; height: 24px; }
40
-
41
- .woocommerce-checkout #payment ul.payment_methods li .stripe-amex-brand,
42
- #add_payment_method #payment ul.payment_methods li .stripe-amex-brand { position: absolute; top: 50%; margin-top: -10px; right: 10px; background: no-repeat url( '../images/amex.svg' ); display: block; width: 30px; height: 24px; }
43
-
44
- .woocommerce-checkout #payment ul.payment_methods li .stripe-diners-brand,
45
- #add_payment_method #payment ul.payment_methods li .stripe-diners-brand { position: absolute; top: 50%; margin-top: -10px; right: 10px; background: no-repeat url( '../images/diners.svg' ); display: block; width: 30px; height: 24px; }
46
-
47
- .woocommerce-checkout #payment ul.payment_methods li .stripe-discover-brand,
48
- #add_payment_method #payment ul.payment_methods li .stripe-discover-brand { position: absolute; top: 50%; margin-top: -10px; right: 10px; background: no-repeat url( '../images/discover.svg' ); display: block; width: 30px; height: 24px; }
49
-
50
- .woocommerce-checkout #payment ul.payment_methods li .stripe-jcb-brand,
51
- #add_payment_method #payment ul.payment_methods li .stripe-jcb-brand { position: absolute; top: 50%; margin-top: -10px; right: 10px; background: no-repeat url( '../images/jcb.svg' ); display: block; width: 30px; height: 24px; }
52
-
53
- .woocommerce-checkout #payment ul.payment_methods li .stripe-maestro-brand,
54
- #add_payment_method #payment ul.payment_methods li .stripe-maestro-brand { position: absolute; top: 50%; margin-top: -10px; right: 10px; background: no-repeat url( '../images/maestro.svg' ); display: block; width: 30px; height: 24px; }
55
-
56
- .woocommerce-checkout #payment ul.payment_methods li .stripe-mastercard-brand,
57
- #add_payment_method #payment ul.payment_methods li .stripe-mastercard-brand { position: absolute; top: 50%; margin-top: -10px; right: 10px; background: no-repeat url( '../images/mastercard.svg' ); display: block; width: 30px; height: 24px; }
58
-
59
- .woocommerce-checkout #payment ul.payment_methods .stripe-card-group,
60
- #add_payment_method #payment ul.payment_methods .stripe-card-group { position: relative; }
changelog.txt CHANGED
@@ -1,5 +1,10 @@
1
*** Changelog ***
2
3
= 4.1.14 - 2019-01-10 =
4
* Remove - Stripe specific styling to allow themes to style accordingly.
5
* Tweak - Handle error if product is not found in payment request.
1
*** Changelog ***
2
3
+ = 4.1.15 - 2019-03-12 =
4
+ * Fix - Prevent canceled webhook from processing non Stripe payments.
5
+ * Fix - "Retain Stripe Data" setting placement on WooCommerce settings page.
6
+ * Tweak - Stripe API version updated to support 2019-02-19.
7
+
8
= 4.1.14 - 2019-01-10 =
9
* Remove - Stripe specific styling to allow themes to style accordingly.
10
* Tweak - Handle error if product is not found in payment request.
includes/admin/class-wc-stripe-admin-notices.php CHANGED
@@ -61,7 +61,7 @@ class WC_Stripe_Admin_Notices {
61
62
if ( $notice['dismissible'] ) {
63
?>
64
- <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-stripe-hide-notice', $notice_key ), 'wc_stripe_hide_notices_nonce', '_wc_stripe_notice_nonce' ) ); ?>" class="woocommerce-message-close notice-dismiss" style="position:absolute;right:1px;padding:9px;text-decoration:none;"></a>
65
<?php
66
}
67
61
62
if ( $notice['dismissible'] ) {
63
?>
64
+ <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-stripe-hide-notice', $notice_key ), 'wc_stripe_hide_notices_nonce', '_wc_stripe_notice_nonce' ) ); ?>" class="woocommerce-message-close notice-dismiss" style="position:relative;float:right;padding:9px 0px 9px 9px 9px;text-decoration:none;"></a>
65
<?php
66
}
67
includes/admin/class-wc-stripe-privacy.php CHANGED
@@ -44,7 +44,18 @@ class WC_Stripe_Privacy extends WC_Abstract_Privacy {
44
),
45
);
46
47
- array_splice( $settings, ( count( $settings ) - 1 ), 0, $insert_setting );
48
49
return $settings;
50
}
44
),
45
);
46
47
+ $index = null;
48
+
49
+ foreach ( $settings as $key => $value) {
50
+ if ( 'sectionend' === $value[ 'type' ] && 'personal_data_retention' === $value[ 'id' ] ) {
51
+ $index = $key;
52
+ break;
53
+ }
54
+ }
55
+
56
+ if ( ! is_null( $index ) ) {
57
+ array_splice( $settings, $index, 0, $insert_setting );
58
+ }
59
60
return $settings;
61
}
includes/admin/stripe-settings.php CHANGED
@@ -79,7 +79,7 @@ return apply_filters(
79
'statement_descriptor' => array(
80
'title' => __( 'Statement Descriptor', 'woocommerce-gateway-stripe' ),
81
'type' => 'text',
82
- 'description' => __( 'This may be up to 22 characters. The statement description must contain at least one letter, may not include ><"\' characters, and will appear on your customer\'s statement in capital letters.', 'woocommerce-gateway-stripe' ),
83
'default' => '',
84
'desc_tip' => true,
85
),
79
'statement_descriptor' => array(
80
'title' => __( 'Statement Descriptor', 'woocommerce-gateway-stripe' ),
81
'type' => 'text',
82
+ 'description' => __( 'Statement descriptors are limited to 22 characters, cannot use the special characters >, <, ", \, \', *, and must not consist solely of numbers. This will appear on your customer\'s statement in capital letters.', 'woocommerce-gateway-stripe' ),
83
'default' => '',
84
'desc_tip' => true,
85
),
includes/class-wc-stripe-api.php CHANGED
@@ -14,7 +14,7 @@ class WC_Stripe_API {
14
* Stripe API Endpoint
15
*/
16
const ENDPOINT = 'https://api.stripe.com/v1/';
17
- const STRIPE_API_VERSION = '2018-09-24';
18
19
/**
20
* Secret API Key.
14
* Stripe API Endpoint
15
*/
16
const ENDPOINT = 'https://api.stripe.com/v1/';
17
+ const STRIPE_API_VERSION = '2019-02-19';
18
19
/**
20
* Secret API Key.
includes/class-wc-stripe-webhook-handler.php CHANGED
@@ -397,7 +397,7 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
397
* that redirects and awaits payments from customer.
398
*
399
* @since 4.0.0
400
- * @version 4.0.0
401
* @param object $notification
402
*/
403
public function process_webhook_source_canceled( $notification ) {
@@ -413,6 +413,12 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
413
}
414
}
415
416
if ( 'cancelled' !== $order->get_status() ) {
417
$order->update_status( 'cancelled', __( 'This payment has cancelled.', 'woocommerce-gateway-stripe' ) );
418
}
397
* that redirects and awaits payments from customer.
398
*
399
* @since 4.0.0
400
+ * @since 4.1.15 Add check to make sure order is processed by Stripe.
401
* @param object $notification
402
*/
403
public function process_webhook_source_canceled( $notification ) {
413
}
414
}
415
416
+ // Don't proceed if payment method isn't Stripe.
417
+ if ( 'stripe' !== $order->get_payment_method() ) {
418
+ WC_Stripe_Logger::log( 'Canceled webhook abort: Order was not processed by Stripe: ' . $order->get_id() );
419
+ return;
420
+ }
421
+
422
if ( 'cancelled' !== $order->get_status() ) {
423
$order->update_status( 'cancelled', __( 'This payment has cancelled.', 'woocommerce-gateway-stripe' ) );
424
}
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort,
4
Requires at least: 4.4
5
Tested up to: 5.0
6
Requires PHP: 5.6
7
- Stable tag: 4.1.14
8
License: GPLv3
9
License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
Attributions: thorsten-stripe
@@ -101,9 +101,10 @@ If you get stuck, you can ask for help in the Plugin Forum.
101
102
== Changelog ==
103
104
- = 4.1.14 - 2019-01-10 =
105
- * Remove - Stripe specific styling to allow themes to style accordingly.
106
- * Tweak - Handle error if product is not found in payment request.
107
108
[See changelog for all versions](https://raw.githubusercontent.com/woothemes/woocommerce-gateway-stripe/master/changelog.txt).
109
4
Requires at least: 4.4
5
Tested up to: 5.0
6
Requires PHP: 5.6
7
+ Stable tag: 4.1.15
8
License: GPLv3
9
License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
Attributions: thorsten-stripe
101
102
== Changelog ==
103
104
+ = 4.1.15 - 2019-03-12 =
105
+ * Fix - Prevent canceled webhook from processing non Stripe payments.
106
+ * Fix - "Retain Stripe Data" setting placement on WooCommerce settings page.
107
+ * Tweak - Stripe API version updated to support 2019-02-19.
108
109
[See changelog for all versions](https://raw.githubusercontent.com/woothemes/woocommerce-gateway-stripe/master/changelog.txt).
110
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: 4.1.14
9
* Requires at least: 4.4
10
* Tested up to: 5.0
11
* WC requires at least: 2.6
@@ -46,7 +46,7 @@ function woocommerce_gateway_stripe_init() {
46
/**
47
* Required minimums and constants
48
*/
49
- define( 'WC_STRIPE_VERSION', '4.1.14' );
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__ );
5
* Description: Take credit card payments on your store using Stripe.
6
* Author: WooCommerce
7
* Author URI: https://woocommerce.com/
8
+ * Version: 4.1.15
9
* Requires at least: 4.4
10
* Tested up to: 5.0
11
* WC requires at least: 2.6
46
/**
47
* Required minimums and constants
48
*/
49
+ define( 'WC_STRIPE_VERSION', '4.1.15' );
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__ );