Skip to content

Commit

Permalink
Define the Stripe API version we use in the JS Stripe instance (#3392)
Browse files Browse the repository at this point in the history
* Define the Stripe JS API version we use

* Add changelog entries

---------

Co-authored-by: Diego Curbelo <[email protected]>
  • Loading branch information
james-allan and diegocurbelo committed Sep 2, 2024
1 parent 10fee72 commit cebe0cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Tweak - Update capabilities to payment methods mapping.
* Fix - Address QIT Security test errors.
* Fix - Address QIT PHPStan test errors.
* Update - Specify the JS Stripe API version as 2024-06-20.
* Fix - Ensure payment tokens are detached from Stripe when a user is deleted, regardless of if the admin user has a Stripe account.

= 8.6.1 - 2024-08-09 =
Expand Down
5 changes: 4 additions & 1 deletion client/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ export default class WCStripeAPI {
}

createStripe( key, locale, betas = [] ) {
const options = { locale };
const options = {
locale,
apiVersion: this.options.apiVersion,
};

if ( betas.length ) {
options.betas = betas;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ public function javascript_params() {
'isUPEEnabled' => true,
'key' => $this->publishable_key,
'locale' => WC_Stripe_Helper::convert_wc_locale_to_stripe_locale( get_locale() ),
'apiVersion' => WC_Stripe_API::STRIPE_API_VERSION,
];

$enabled_billing_fields = [];
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ If you get stuck, you can ask for help in the Plugin Forum.
* Tweak - Update capabilities to payment methods mapping.
* Fix - Address QIT Security test errors.
* Fix - Address QIT PHPStan test errors.
* Update - Specify the JS Stripe API version as 2024-06-20.
* Fix - Ensure payment tokens are detached from Stripe when a user is deleted, regardless of if the admin user has a Stripe account.

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

0 comments on commit cebe0cb

Please sign in to comment.