WooCommerce Stripe Payment Gateway - Version 3.2.0

Version Description

  • Fix - Authorized first orders were not able to be refund.
  • Fix - Payment Request not honoring different shipping address in certain cases.
  • Fix - In certain Chrome versions, states are not abbreviated causing shipping validation issues with Payment Request API.
  • Add - Support for Dynamic Pricing.
Download this release

Release Info

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

Code changes from version 3.1.9 to 3.2.0

includes/class-wc-gateway-stripe.php CHANGED
@@ -842,6 +842,10 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway_CC {
842
  if ( $source->source ) {
843
  version_compare( WC_VERSION, '3.0.0', '<' ) ? update_post_meta( $order_id, '_stripe_card_id', $source->source ) : $order->update_meta_data( '_stripe_card_id', $source->source );
844
  }
 
 
 
 
845
  }
846
 
847
  /**
842
  if ( $source->source ) {
843
  version_compare( WC_VERSION, '3.0.0', '<' ) ? update_post_meta( $order_id, '_stripe_card_id', $source->source ) : $order->update_meta_data( '_stripe_card_id', $source->source );
844
  }
845
+
846
+ if ( is_callable( array( $order, 'save' ) ) ) {
847
+ $order->save();
848
+ }
849
  }
850
 
851
  /**
includes/class-wc-stripe-apple-pay.php CHANGED
@@ -86,6 +86,13 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
86
  */
87
  public $is_shipping_enabled;
88
 
 
 
 
 
 
 
 
89
  /**
90
  * Constructor.
91
  *
@@ -105,6 +112,7 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
105
  $this->statement_descriptor = $_SERVER['SERVER_NAME'];
106
  }
107
 
 
108
  $this->enabled = ( ! empty( $gateway_settings['enabled'] ) && 'yes' === $gateway_settings['enabled'] ) ? true : false;
109
  $this->testmode = ( ! empty( $gateway_settings['testmode'] ) && 'yes' === $gateway_settings['testmode'] ) ? true : false;
110
  $this->capture = ( ! empty( $gateway_settings['capture'] ) && 'yes' === $gateway_settings['capture'] ) ? true : false;
@@ -482,7 +490,9 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
482
 
483
  WC()->cart->calculate_totals();
484
 
485
- wp_send_json( array( 'line_items' => $this->build_line_items(), 'total' => WC()->cart->total ) );
 
 
486
  }
487
 
488
  /**
@@ -496,7 +506,9 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
496
  wp_die( __( 'Cheatin&#8217; huh?', 'woocommerce-gateway-stripe' ) );
497
  }
498
 
499
- wp_send_json( array( 'line_items' => $this->build_line_items(), 'total' => WC()->cart->total ) );
 
 
500
  }
501
 
502
  /**
@@ -539,9 +551,12 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
539
  WC()->customer->set_shipping_to_base();
540
  }
541
 
542
- version_compare( WC_VERSION, '3.0', '<' ) ? WC()->customer->calculated_shipping( true ) : WC()->customer->set_calculated_shipping( true );
543
-
544
- WC()->customer->save();
 
 
 
545
 
546
  /**
547
  * Set the shipping package.
@@ -626,12 +641,15 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
626
 
627
  WC()->cart->calculate_totals();
628
 
629
- wp_send_json( array( 'success' => 'true', 'shipping_methods' => $this->build_shipping_methods( $data ), 'line_items' => $this->build_line_items(), 'total' => WC()->cart->total ) );
 
 
630
  } else {
631
  throw new Exception( __( 'Unable to find shipping method for address.', 'woocommerce-gateway-stripe' ) );
632
  }
633
  } catch ( Exception $e ) {
634
- wp_send_json( array( 'success' => 'false', 'shipping_methods' => array(), 'line_items' => $this->build_line_items(), 'total' => WC()->cart->total ) );
 
635
  }
636
  }
637
 
@@ -656,34 +674,8 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
656
 
657
  WC()->cart->calculate_totals();
658
 
659
- // Send back the new cart total.
660
- $currency = get_woocommerce_currency();
661
- $tax_total = max( 0, round( WC()->cart->tax_total + WC()->cart->shipping_tax_total, WC()->cart->dp ) );
662
- $data = array(
663
- 'total' => WC()->cart->total,
664
- );
665
-
666
- // Include fees and taxes as displayItems.
667
- foreach ( WC()->cart->fees as $key => $fee ) {
668
- $data['items'][] = array(
669
- 'label' => $fee->name,
670
- 'amount' => array(
671
- 'currency' => $currency,
672
- 'value' => $fee->amount,
673
- ),
674
- );
675
- }
676
- if ( 0 < $tax_total ) {
677
- $data['items'][] = array(
678
- 'label' => __( 'Tax', 'woocommerce-gateway-stripe' ),
679
- 'amount' => array(
680
- 'currency' => $currency,
681
- 'value' => $tax_total,
682
- ),
683
- );
684
- }
685
-
686
- wp_send_json( array( 'success' => 'true', 'line_items' => $this->build_line_items(), 'total' => WC()->cart->total ) );
687
  }
688
 
689
  /**
@@ -815,20 +807,18 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
815
  * Builds the line items to pass to Apple Pay.
816
  *
817
  * @since 3.1.0
818
- * @version 3.1.0
819
  */
820
  public function build_line_items() {
821
  if ( ! defined( 'WOOCOMMERCE_CART' ) ) {
822
  define( 'WOOCOMMERCE_CART', true );
823
  }
824
-
825
- $decimals = apply_filters( 'wc_stripe_apple_pay_decimals', 2 );
826
 
827
  $items = array();
828
  $subtotal = 0;
829
 
830
  foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
831
- $amount = wc_format_decimal( $cart_item['line_subtotal'], $decimals );
832
  $subtotal += $cart_item['line_subtotal'];
833
  $quantity_label = 1 < $cart_item['quantity'] ? ' (x' . $cart_item['quantity'] . ')' : '';
834
 
@@ -837,7 +827,7 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
837
  $item = array(
838
  'type' => 'final',
839
  'label' => $product_name . $quantity_label,
840
- 'amount' => wc_format_decimal( $amount, $decimals ),
841
  );
842
 
843
  $items[] = $item;
@@ -849,15 +839,15 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
849
  $items[] = array(
850
  'type' => 'final',
851
  'label' => esc_html( __( 'Sub-Total', 'woocommerce-gateway-stripe' ) ),
852
- 'amount' => wc_format_decimal( $subtotal, $decimals ),
853
  );
854
  }
855
 
856
- $discounts = wc_format_decimal( WC()->cart->get_cart_discount_total(), $decimals );
857
- $tax = wc_format_decimal( WC()->cart->tax_total + WC()->cart->shipping_tax_total, $decimals );
858
- $shipping = wc_format_decimal( WC()->cart->shipping_total, $decimals );
859
- $item_total = wc_format_decimal( WC()->cart->cart_contents_total, $decimals ) + $discounts;
860
- $order_total = wc_format_decimal( $item_total + $tax + $shipping, $decimals );
861
 
862
  if ( wc_tax_enabled() ) {
863
  $items[] = array(
@@ -883,7 +873,7 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
883
  );
884
  }
885
 
886
- return $items;
887
  }
888
 
889
  /**
@@ -899,6 +889,10 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
899
  throw new Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-stripe' ), 520 ) );
900
  }
901
 
 
 
 
 
902
  $order = wc_create_order();
903
  $order_id = version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->id : $order->get_id();
904
 
@@ -1100,7 +1094,8 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
1100
 
1101
  $available_gateways = WC()->payment_gateways->get_available_payment_gateways();
1102
  $order->set_payment_method( $available_gateways['stripe'] );
1103
-
 
1104
  if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
1105
  $order->set_total( WC()->cart->shipping_total, 'shipping' );
1106
  $order->set_total( WC()->cart->get_cart_discount_total(), 'cart_discount' );
@@ -1114,7 +1109,14 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
1114
  $order->set_discount_tax( WC()->cart->get_cart_discount_tax_total() );
1115
  $order->set_cart_tax( WC()->cart->tax_total );
1116
  $order->set_shipping_tax( WC()->cart->shipping_tax_total );
1117
- $order->set_total( WC()->cart->total );
 
 
 
 
 
 
 
1118
  $order->save();
1119
  }
1120
 
86
  */
87
  public $is_shipping_enabled;
88
 
89
+ /**
90
+ * Decimal places from WC core.
91
+ *
92
+ * @var int
93
+ */
94
+ public $dp;
95
+
96
  /**
97
  * Constructor.
98
  *
112
  $this->statement_descriptor = $_SERVER['SERVER_NAME'];
113
  }
114
 
115
+ $this->dp = wc_get_price_decimals();
116
  $this->enabled = ( ! empty( $gateway_settings['enabled'] ) && 'yes' === $gateway_settings['enabled'] ) ? true : false;
117
  $this->testmode = ( ! empty( $gateway_settings['testmode'] ) && 'yes' === $gateway_settings['testmode'] ) ? true : false;
118
  $this->capture = ( ! empty( $gateway_settings['capture'] ) && 'yes' === $gateway_settings['capture'] ) ? true : false;
490
 
491
  WC()->cart->calculate_totals();
492
 
493
+ $build_items = $this->build_line_items();
494
+
495
+ wp_send_json( array( 'line_items' => $build_items['line_items'], 'total' => $build_items['total'] ) );
496
  }
497
 
498
  /**
506
  wp_die( __( 'Cheatin&#8217; huh?', 'woocommerce-gateway-stripe' ) );
507
  }
508
 
509
+ $build_items = $this->build_line_items();
510
+
511
+ wp_send_json( array( 'line_items' => $build_items['line_items'], 'total' => $build_items['total'] ) );
512
  }
513
 
514
  /**
551
  WC()->customer->set_shipping_to_base();
552
  }
553
 
554
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
555
+ WC()->customer->calculated_shipping( true );
556
+ } else {
557
+ WC()->customer->set_calculated_shipping( true );
558
+ WC()->customer->save();
559
+ }
560
 
561
  /**
562
  * Set the shipping package.
641
 
642
  WC()->cart->calculate_totals();
643
 
644
+ $build_items = $this->build_line_items();
645
+
646
+ wp_send_json( array( 'success' => 'true', 'shipping_methods' => $this->build_shipping_methods( $data ), 'line_items' => $build_items['line_items'], 'total' => $build_items['total'] ) );
647
  } else {
648
  throw new Exception( __( 'Unable to find shipping method for address.', 'woocommerce-gateway-stripe' ) );
649
  }
650
  } catch ( Exception $e ) {
651
+ $build_items = $this->build_line_items();
652
+ wp_send_json( array( 'success' => 'false', 'shipping_methods' => array(), 'line_items' => $build_items['line_items'], 'total' => $build_items['total'] ) );
653
  }
654
  }
655
 
674
 
675
  WC()->cart->calculate_totals();
676
 
677
+ $build_items = $this->build_line_items();
678
+ wp_send_json( array( 'success' => 'true', 'line_items' => $build_items['line_items'], 'total' => $build_items['total'] ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
679
  }
680
 
681
  /**
807
  * Builds the line items to pass to Apple Pay.
808
  *
809
  * @since 3.1.0
810
+ * @version 3.2.0
811
  */
812
  public function build_line_items() {
813
  if ( ! defined( 'WOOCOMMERCE_CART' ) ) {
814
  define( 'WOOCOMMERCE_CART', true );
815
  }
 
 
816
 
817
  $items = array();
818
  $subtotal = 0;
819
 
820
  foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
821
+ $amount = wc_format_decimal( $cart_item['line_subtotal'], $this->dp );
822
  $subtotal += $cart_item['line_subtotal'];
823
  $quantity_label = 1 < $cart_item['quantity'] ? ' (x' . $cart_item['quantity'] . ')' : '';
824
 
827
  $item = array(
828
  'type' => 'final',
829
  'label' => $product_name . $quantity_label,
830
+ 'amount' => wc_format_decimal( $amount, $this->dp ),
831
  );
832
 
833
  $items[] = $item;
839
  $items[] = array(
840
  'type' => 'final',
841
  'label' => esc_html( __( 'Sub-Total', 'woocommerce-gateway-stripe' ) ),
842
+ 'amount' => wc_format_decimal( $subtotal, $this->dp ),
843
  );
844
  }
845
 
846
+ $discounts = wc_format_decimal( WC()->cart->get_cart_discount_total(), $this->dp );
847
+ $tax = wc_format_decimal( WC()->cart->tax_total + WC()->cart->shipping_tax_total, $this->dp );
848
+ $shipping = wc_format_decimal( WC()->cart->shipping_total, $this->dp );
849
+ $item_total = wc_format_decimal( WC()->cart->cart_contents_total, $this->dp ) + $discounts;
850
+ $order_total = wc_format_decimal( $item_total + $tax + $shipping, $this->dp );
851
 
852
  if ( wc_tax_enabled() ) {
853
  $items[] = array(
873
  );
874
  }
875
 
876
+ return array( 'line_items' => $items, 'total' => $order_total );
877
  }
878
 
879
  /**
889
  throw new Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-stripe' ), 520 ) );
890
  }
891
 
892
+ if ( ! defined( 'WOOCOMMERCE_CART' ) ) {
893
+ define( 'WOOCOMMERCE_CART', true );
894
+ }
895
+
896
  $order = wc_create_order();
897
  $order_id = version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->id : $order->get_id();
898
 
1094
 
1095
  $available_gateways = WC()->payment_gateways->get_available_payment_gateways();
1096
  $order->set_payment_method( $available_gateways['stripe'] );
1097
+ WC()->cart->calculate_totals();
1098
+
1099
  if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
1100
  $order->set_total( WC()->cart->shipping_total, 'shipping' );
1101
  $order->set_total( WC()->cart->get_cart_discount_total(), 'cart_discount' );
1109
  $order->set_discount_tax( WC()->cart->get_cart_discount_tax_total() );
1110
  $order->set_cart_tax( WC()->cart->tax_total );
1111
  $order->set_shipping_tax( WC()->cart->shipping_tax_total );
1112
+
1113
+ $discounts = wc_format_decimal( WC()->cart->get_cart_discount_total(), $this->dp );
1114
+ $tax = wc_format_decimal( WC()->cart->tax_total + WC()->cart->shipping_tax_total, $this->dp );
1115
+ $shipping = wc_format_decimal( WC()->cart->shipping_total, $this->dp );
1116
+ $item_total = wc_format_decimal( WC()->cart->cart_contents_total, $this->dp ) + $discounts;
1117
+ $order_total = wc_format_decimal( $item_total + $tax + $shipping, $this->dp );
1118
+
1119
+ $order->set_total( $order_total );
1120
  $order->save();
1121
  }
1122
 
includes/class-wc-stripe-payment-request.php CHANGED
@@ -137,10 +137,12 @@ class WC_Stripe_Payment_Request {
137
  * Calculate and set shipping method.
138
  *
139
  * @since 3.1.0
140
- * @version 3.1.0
141
  * @param array $address
142
  */
143
  public function calculate_shipping( $address = array() ) {
 
 
144
  $country = $address['country'];
145
  $state = $address['state'];
146
  $postcode = $address['postcode'];
@@ -148,6 +150,17 @@ class WC_Stripe_Payment_Request {
148
  $address_1 = $address['address'];
149
  $address_2 = $address['address_2'];
150
 
 
 
 
 
 
 
 
 
 
 
 
151
  WC()->shipping->reset_shipping();
152
 
153
  if ( $postcode && WC_Validation::is_postcode( $postcode, $country ) ) {
@@ -296,6 +309,7 @@ class WC_Stripe_Payment_Request {
296
  }
297
 
298
  $_POST['terms'] = 1;
 
299
 
300
  WC()->checkout()->process_checkout();
301
 
137
  * Calculate and set shipping method.
138
  *
139
  * @since 3.1.0
140
+ * @version 3.2.0
141
  * @param array $address
142
  */
143
  public function calculate_shipping( $address = array() ) {
144
+ global $states;
145
+
146
  $country = $address['country'];
147
  $state = $address['state'];
148
  $postcode = $address['postcode'];
150
  $address_1 = $address['address'];
151
  $address_2 = $address['address_2'];
152
 
153
+ $country_class = new WC_Countries();
154
+ $country_class->load_country_states();
155
+
156
+ /**
157
+ * In some versions of Chrome, state can be a full name. So we need
158
+ * to convert that to abbreviation as WC is expecting that.
159
+ */
160
+ if ( 2 < strlen( $state ) ) {
161
+ $state = array_search( ucfirst( strtolower( $state ) ), $states[ $country ] );
162
+ }
163
+
164
  WC()->shipping->reset_shipping();
165
 
166
  if ( $postcode && WC_Validation::is_postcode( $postcode, $country ) ) {
309
  }
310
 
311
  $_POST['terms'] = 1;
312
+ $_POST['ship_to_different_address'] = 1;
313
 
314
  WC()->checkout()->process_checkout();
315
 
includes/settings-stripe.php CHANGED
@@ -34,29 +34,29 @@ return apply_filters( 'wc_stripe_settings',
34
  'default' => 'yes',
35
  'desc_tip' => true,
36
  ),
37
- 'test_secret_key' => array(
38
- 'title' => __( 'Test Secret Key', 'woocommerce-gateway-stripe' ),
39
  'type' => 'text',
40
  'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
41
  'default' => '',
42
  'desc_tip' => true,
43
  ),
44
- 'test_publishable_key' => array(
45
- 'title' => __( 'Test Publishable Key', 'woocommerce-gateway-stripe' ),
46
  'type' => 'text',
47
  'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
48
  'default' => '',
49
  'desc_tip' => true,
50
  ),
51
- 'secret_key' => array(
52
- 'title' => __( 'Live Secret Key', 'woocommerce-gateway-stripe' ),
53
  'type' => 'text',
54
  'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
55
  'default' => '',
56
  'desc_tip' => true,
57
  ),
58
- 'publishable_key' => array(
59
- 'title' => __( 'Live Publishable Key', 'woocommerce-gateway-stripe' ),
60
  'type' => 'text',
61
  'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
62
  'default' => '',
34
  'default' => 'yes',
35
  'desc_tip' => true,
36
  ),
37
+ 'test_publishable_key' => array(
38
+ 'title' => __( 'Test Publishable Key', 'woocommerce-gateway-stripe' ),
39
  'type' => 'text',
40
  'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
41
  'default' => '',
42
  'desc_tip' => true,
43
  ),
44
+ 'test_secret_key' => array(
45
+ 'title' => __( 'Test Secret Key', 'woocommerce-gateway-stripe' ),
46
  'type' => 'text',
47
  'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
48
  'default' => '',
49
  'desc_tip' => true,
50
  ),
51
+ 'publishable_key' => array(
52
+ 'title' => __( 'Live Publishable Key', 'woocommerce-gateway-stripe' ),
53
  'type' => 'text',
54
  'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
55
  'default' => '',
56
  'desc_tip' => true,
57
  ),
58
+ 'secret_key' => array(
59
+ 'title' => __( 'Live Secret Key', 'woocommerce-gateway-stripe' ),
60
  'type' => 'text',
61
  'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
62
  'default' => '',
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic, woothemes, mikejolley, akeda, royho, mattyza, slash1an
3
  Tags: credit card, stripe, woocommerce
4
  Requires at least: 4.4
5
  Tested up to: 4.7.2
6
- Stable tag: 3.1.9
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -95,6 +95,12 @@ If you get stuck, you can ask for help in the Plugin Forum.
95
 
96
  == Changelog ==
97
 
 
 
 
 
 
 
98
  = 3.1.9 =
99
  * Fix - Handle a subscription renewal failed payment order correctly to prevent orders going into onhold status.
100
  * Fix - Auto accept terms for Payment Request API to prevent blocker for the checkout.
@@ -194,11 +200,8 @@ If you get stuck, you can ask for help in the Plugin Forum.
194
 
195
  == Upgrade Notice ==
196
 
197
- = 3.1.9 =
198
- * Fix - Handle a subscription renewal failed payment order correctly to prevent orders going into onhold status.
199
- * Fix - Auto accept terms for Payment Request API to prevent blocker for the checkout.
200
- * Fix - Add payment method via Stripe checkout button showed pricing.
201
- * Fix - When Stripe customer id is no longer linked to Stripe account, customer not found can happen.
202
- * Fix - On Subscription failed payment, new payment info not updating causing failed payments for recurring charges.
203
- * Add - Action hook to manipulate process response from API "wc_gateway_stripe_process_response".
204
- * Add - Apple Pay compatibility with WooCommerce Sequential Numbers Pro.
3
  Tags: credit card, stripe, woocommerce
4
  Requires at least: 4.4
5
  Tested up to: 4.7.2
6
+ Stable tag: 3.2.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
95
 
96
  == Changelog ==
97
 
98
+ = 3.2.0 =
99
+ * Fix - Authorized first orders were not able to be refund.
100
+ * Fix - Payment Request not honoring different shipping address in certain cases.
101
+ * Fix - In certain Chrome versions, states are not abbreviated causing shipping validation issues with Payment Request API.
102
+ * Add - Support for Dynamic Pricing.
103
+
104
  = 3.1.9 =
105
  * Fix - Handle a subscription renewal failed payment order correctly to prevent orders going into onhold status.
106
  * Fix - Auto accept terms for Payment Request API to prevent blocker for the checkout.
200
 
201
  == Upgrade Notice ==
202
 
203
+ = 3.2.0 =
204
+ * Fix - Authorized first orders were not able to be refund.
205
+ * Fix - Payment Request not honoring different shipping address in certain cases.
206
+ * Fix - In certain Chrome versions, states are not abbreviated causing shipping validation issues with Payment Request API.
207
+ * Add - Support for Dynamic Pricing.
 
 
 
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
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.9' );
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__ );
@@ -472,6 +472,7 @@ if ( ! class_exists( 'WC_Stripe' ) ) :
472
 
473
  // Store other data such as fees
474
  update_post_meta( $order_id, 'Stripe Payment ID', $result->id );
 
475
 
476
  if ( isset( $result->balance_transaction ) && isset( $result->balance_transaction->fee ) ) {
477
  // Fees and Net needs to both come from Stripe to be accurate as the returned
5
  * Description: Take credit card payments on your store using Stripe.
6
  * Author: WooCommerce
7
  * Author URI: https://woocommerce.com/
8
+ * Version: 3.2.0
9
  * Text Domain: woocommerce-gateway-stripe
10
  * Domain Path: /languages
11
  *
32
  /**
33
  * Required minimums and constants
34
  */
35
+ define( 'WC_STRIPE_VERSION', '3.2.0' );
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__ );
472
 
473
  // Store other data such as fees
474
  update_post_meta( $order_id, 'Stripe Payment ID', $result->id );
475
+ update_post_meta( $order_id, '_transaction_id', $result->id );
476
 
477
  if ( isset( $result->balance_transaction ) && isset( $result->balance_transaction->fee ) ) {
478
  // Fees and Net needs to both come from Stripe to be accurate as the returned