Skip to content

Commit

Permalink
Merge branch 'master' into fix/settings-array-placement
Browse files Browse the repository at this point in the history
  • Loading branch information
roykho authored Mar 12, 2019
2 parents 295c899 + 26b006b commit 4d6fe21
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
*** Changelog ***

= 4.1.15 - 2019-03-12 =
* Fix - Prevent canceled webhook from processing non Stripe payments.
* Tweak - Stripe API version updated to support 2019-02-19.

= 4.1.14 - 2019-01-10 =
* Remove - Stripe specific styling to allow themes to style accordingly.
* Tweak - Handle error if product is not found in payment request.
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/stripe-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'statement_descriptor' => array(
'title' => __( 'Statement Descriptor', 'woocommerce-gateway-stripe' ),
'type' => 'text',
'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' ),
'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' ),
'default' => '',
'desc_tip' => true,
),
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-stripe-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class WC_Stripe_API {
* Stripe API Endpoint
*/
const ENDPOINT = 'https://api.stripe.com/v1/';
const STRIPE_API_VERSION = '2018-09-24';
const STRIPE_API_VERSION = '2019-02-19';

/**
* Secret API Key.
Expand Down
8 changes: 7 additions & 1 deletion includes/class-wc-stripe-webhook-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public function process_webhook_charge_failed( $notification ) {
* that redirects and awaits payments from customer.
*
* @since 4.0.0
* @version 4.0.0
* @since 4.1.15 Add check to make sure order is processed by Stripe.
* @param object $notification
*/
public function process_webhook_source_canceled( $notification ) {
Expand All @@ -413,6 +413,12 @@ public function process_webhook_source_canceled( $notification ) {
}
}

// Don't proceed if payment method isn't Stripe.
if ( 'stripe' !== $order->get_payment_method() ) {
WC_Stripe_Logger::log( 'Canceled webhook abort: Order was not processed by Stripe: ' . $order->get_id() );
return;
}

if ( 'cancelled' !== $order->get_status() ) {
$order->update_status( 'cancelled', __( 'This payment has cancelled.', 'woocommerce-gateway-stripe' ) );
}
Expand Down
8 changes: 3 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,10 @@ If you get stuck, you can ask for help in the Plugin Forum.

== Changelog ==

= 4.1.15 - 2019-03-10 =
= 4.1.15 - 2019-03-12 =
* Fix - Prevent canceled webhook from processing non Stripe payments.
* Fix - "Retain Stripe Data" setting placement on WooCommerce settings page.

= 4.1.14 - 2019-01-10 =
* Remove - Stripe specific styling to allow themes to style accordingly.
* Tweak - Handle error if product is not found in payment request.
* Tweak - Stripe API version updated to support 2019-02-19.

[See changelog for all versions](https://raw.githubusercontent.com/woothemes/woocommerce-gateway-stripe/master/changelog.txt).

Expand Down
4 changes: 2 additions & 2 deletions woocommerce-gateway-stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Take credit card payments on your store using Stripe.
* Author: WooCommerce
* Author URI: https://woocommerce.com/
* Version: 4.1.14
* Version: 4.1.15
* Requires at least: 4.4
* Tested up to: 5.0
* WC requires at least: 2.6
Expand Down Expand Up @@ -46,7 +46,7 @@ function woocommerce_gateway_stripe_init() {
/**
* Required minimums and constants
*/
define( 'WC_STRIPE_VERSION', '4.1.14' );
define( 'WC_STRIPE_VERSION', '4.1.15' );
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
Expand Down

0 comments on commit 4d6fe21

Please sign in to comment.