Skip to content

Commit b8c5f58

Browse files
committed
Merge remote-tracking branch 'origin/release/8.9.0' into trunk
2 parents 9a258c5 + 74ac8b0 commit b8c5f58

File tree

60 files changed

+2744
-287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2744
-287
lines changed

changelog.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
*** Changelog ***
22

3+
= 8.9.0 - 2024-11-14 =
4+
* Update - Enhance webhook processing to enable retrieving orders using payment_intent metadata.
5+
* Dev - Minor updates to the webhook handler class related to payment method names constants.
6+
* Tweak - Improve error message displayed when payment method creation fails in classic checkout.
7+
* Dev - Replace two occurrences of payment method names with their constant equivalents.
8+
* Fix - Hide express checkout when credit card payments are not enabled.
9+
* Fix - Fix issues when detaching payment methods on staging sites (with the new checkout experience enabled).
10+
* Fix - Display a notice if taxes vary by customer's billing address when checking out using the Stripe Express Checkout Element.
11+
* Tweak - Makes the new Stripe Express Checkout Element enabled by default in new accounts.
12+
* Dev - Add multiple unit tests for the Stripe Express Checkout Element implementation (for both frontend and backend).
13+
* Fix - Check if taxes are enabled when applying ECE tax compatibility check.
14+
* Fix - Fix ECE error when initial address on load is not defined as a shipping zone.
15+
* Fix - Corrected card brand capitalization on the My Account → Subscription page.
16+
* Fix - Displays a specific message when an authentication error occurs during checkout for 3DS cards (shortcode version).
17+
* Fix - Show 'Use a New Payment Method' radio button for logged in users only when card saving is enabled.
18+
* Fix - Fix the display and usage of the Link payment method on the shortcode checkout page with the Stripe Express Checkout Element.
19+
* Fix - Fix payment methods count on settings page.
20+
* Update - Improve Express Payment button previews on the edit Block Checkout and Cart pages for Google Pay and Apple Pay.
21+
* Tweak - Add error logging in ECE critical Ajax requests.
22+
* Add - Add support for Stripe Link payments via the new Stripe Checkout Element on the block cart and block checkout pages.
23+
* Add - Add support for Stripe Link payments via the new Stripe Checkout Element on the product, cart, checkout and pay for order pages.
24+
* Tweak - Do not load ECE button if the total amount is 0.
25+
* Add - Show ECE button preview on settings page.
26+
* Tweak - Remove the subscription order notes added each time a source wasn't migrated.
27+
* Tweak - Update ECE default button type.
28+
* Fix - Fix position of ECE button on shortcode cart page.
29+
* Fix - Call ECE specific 'paymentFailed' function only when payment request fails.
30+
* Fix - Fix issue in purchasing subscriptions when the store has no shipping options.
31+
332
= 8.8.2 - 2024-11-07 =
433
* Fix - Prevent marking renewal orders as processing/completed multiple times due to handling the Stripe webhook in parallel.
534
* Dev - Refactor lock_order_payment() to use order meta instead of transients.

client/blocks/express-checkout/apple-pay-preview.js

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import classNames from 'classnames';
2+
import googlePayIcon from '../../../payment-method-icons/google-pay/icon-white.svg';
3+
import applePayIcon from '../../../payment-method-icons/apple-pay/icon-white.svg';
4+
import stripeLinkIcon from '../../../payment-method-icons/link/icon-black.svg';
5+
import './style.scss';
6+
7+
/**
8+
* Base PaymentButtonPreview Component
9+
*
10+
* @param {Object} props
11+
* @param {string} props.icon - The icon to display.
12+
* @param {string} [props.className] - Optional additional class names.
13+
* @return {JSX.Element} The rendered component.
14+
*/
15+
const PaymentButtonPreview = ( { icon, className } ) => (
16+
<div
17+
className={ classNames(
18+
'wc-stripe-payment-button-preview',
19+
className
20+
) }
21+
>
22+
<img src={ icon } alt="Payment Method Icon" />
23+
</div>
24+
);
25+
26+
/**
27+
* GooglePayPreview Component
28+
*
29+
* @return {JSX.Element} The rendered component.
30+
*/
31+
export const GooglePayPreview = () => (
32+
<PaymentButtonPreview
33+
icon={ googlePayIcon }
34+
className="wc-stripe-google-pay-preview"
35+
/>
36+
);
37+
38+
/**
39+
* ApplePayPreview Component
40+
*
41+
* @return {JSX.Element} The rendered component.
42+
*/
43+
export const ApplePayPreview = () => (
44+
<PaymentButtonPreview
45+
icon={ applePayIcon }
46+
className="wc-stripe-apple-pay-preview"
47+
/>
48+
);
49+
50+
/**
51+
* StripeLinkPreview Component
52+
*
53+
* @return {JSX.Element} The rendered component.
54+
*/
55+
export const StripeLinkPreview = () => (
56+
<PaymentButtonPreview
57+
icon={ stripeLinkIcon }
58+
className="wc-stripe-link-preview"
59+
/>
60+
);
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.wc-stripe-payment-button-preview {
2+
display: flex;
3+
justify-content: center;
4+
align-items: center;
5+
background-color: #000;
6+
border-radius: 5px;
7+
height: 40px;
8+
img {
9+
height: 22px;
10+
}
11+
&:hover {
12+
cursor: pointer;
13+
filter: opacity(0.7);
14+
}
15+
/* Stripe Link Overrides */
16+
&.wc-stripe-link-preview {
17+
background-color: #00d66f;
18+
img {
19+
height: 40px;
20+
}
21+
}
22+
}

client/blocks/express-checkout/express-checkout-container.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
import React from 'react';
22
import { Elements } from '@stripe/react-stripe-js';
33
import ExpressCheckoutComponent from './express-checkout-component';
4+
import {
5+
getExpressCheckoutButtonAppearance,
6+
getExpressCheckoutData,
7+
getPaymentMethodTypesForExpressMethod,
8+
} from 'wcstripe/express-checkout/utils';
49

510
export const ExpressCheckoutContainer = ( props ) => {
6-
const { stripe, billing } = props;
11+
const { stripe, billing, expressPaymentMethod } = props;
712
const options = {
813
mode: 'payment',
914
paymentMethodCreation: 'manual',
1015
amount: billing.cartTotal.value,
1116
currency: billing.currency.code.toLowerCase(),
17+
paymentMethodTypes: getPaymentMethodTypesForExpressMethod(
18+
expressPaymentMethod
19+
),
20+
appearance: getExpressCheckoutButtonAppearance(),
21+
locale: getExpressCheckoutData( 'stripe' )?.locale ?? 'en',
1222
};
1323

1424
return (

0 commit comments

Comments
 (0)