Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release branch for 8.7.0 #10027

Merged
merged 85 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
8091bae
Restrict Stripe Link to credit card payment method and improve cleanu…
timur27 Dec 2, 2024
f500790
Update inquiry order notes to use inquiry specific content (#9828)
brucealdridge Dec 2, 2024
55fa477
Prevent browser error on dispute evidence submission (#9847)
brucealdridge Dec 2, 2024
dc6f74c
Fix styling on payment details page in mobile view. (#9790)
shendy-a8c Dec 2, 2024
04f1e4c
Remove payout timing notice and update the help tooltip. (#9812)
shendy-a8c Dec 2, 2024
137745e
[Mobile] Display 'In-Person (POS)' for transactions from mobile POS (…
jaclync Dec 3, 2024
a622dac
chore: PRB references to ECE (#9780)
frosso Dec 3, 2024
6cff322
Fixed Affirm using black logo on dark themes (#9805)
gpressutto5 Dec 3, 2024
af82606
Make test instructions copy icon use the same color as the text next …
gpressutto5 Dec 4, 2024
9169717
Ensure WooPay eligibility is taken into account when retrieving WooPa…
cesarcosta99 Dec 4, 2024
60cd891
Merge trunk v8.6.0 into develop
botwoo Dec 4, 2024
0d80007
Update WooPay theme checkbox copy in settings page (#9843)
malithsen Dec 4, 2024
1fc7a8a
Limit WooPay theme-ing availability to shortcode entrypoint (#9867)
malithsen Dec 4, 2024
b1f9861
Use `type_is_in` filter from the client to filter by multiple transac…
jessy-p Dec 5, 2024
776f752
Fix/php 8 compatibility errors warnings (#9719)
alopezari Dec 5, 2024
9a654de
Migrate to custom containers and better elements scoping (#9782)
timur27 Dec 5, 2024
3bce940
Fixes issue with QIT authentication parsing (#9755)
dmallory42 Dec 5, 2024
c9ebf93
Add WooPay clickwrap support (#9752)
leonardola Dec 5, 2024
907c238
Fallback to card payment type in get_payment_method_types (#9829)
mdmoore Dec 5, 2024
007d6d6
fix: undefined `$cart_contains_subscription` (#9893)
frosso Dec 6, 2024
81ee27e
Implement gateway method to retrieve recommended PMs (#9825)
dpaun1985 Dec 6, 2024
a842ba4
Fix rounding error with deposit products (#9876)
reykjalin Dec 6, 2024
c241ed6
Normalize HK addresses for Apple Pay (#9869)
asumaran Dec 6, 2024
737aca0
Fix error log messages incorrecty categorized as info (#9890)
brucealdridge Dec 8, 2024
15e7ef8
Add check for `wc_get_payment_gateway_by_order` (#9903)
bor0 Dec 9, 2024
0ea8272
fix: console warning for useEffect on plugins page (#9913)
frosso Dec 10, 2024
adbac29
Update confirmation modal after progressive onboarding (#9915)
elazzabi Dec 10, 2024
63376c3
Refine ECE availability check for Variable Subscriptions (#9897)
asumaran Dec 10, 2024
476c528
Payouts: Rename 'Bank reference key' to 'Bank reference ID' for consi…
nagpai Dec 11, 2024
d121b68
Update the Jetpack onboarding flow (#9930)
elazzabi Dec 12, 2024
5e54069
Adjust go-live modal and notice to the latest design (#9931)
oaratovskyi Dec 12, 2024
179f84e
chore: remove ECE error assignment on loaderror (#9935)
frosso Dec 12, 2024
9d22a75
Move from docker-based to standalone Jurassic Tube setup (#9839)
timur27 Dec 12, 2024
f08a727
feat: tokenized ECE product page compatibility (#9877)
frosso Dec 12, 2024
02da62a
Fixed UPE country detection in Checkout for non-logged in users (#9912)
gpressutto5 Dec 12, 2024
52dbe03
Pass footer header styles to WooPay (#9880)
malithsen Dec 12, 2024
9729695
chore: remove tokeinzed payment request code (#9920)
frosso Dec 12, 2024
1f857c7
Skip mysqlcheck SSL Requirement during E2E environment setup (#9941)
danielmx-dev Dec 12, 2024
aa3203c
Reports: Update Transaction ID column label (#9911)
nagpai Dec 13, 2024
6a67203
Fix issue where order status and data are not updated when an order i…
zmaglica Dec 13, 2024
42bf30b
Migrate capabilities from test-drive to live account (#9928)
dpaun1985 Dec 13, 2024
1db6178
Fix Jetpack onboarding by replacing the "from" query param (#9949)
elazzabi Dec 13, 2024
2e14de5
Added a callback instead of a direct call to avoid i18n notices. (#9884)
zinigor Dec 13, 2024
4608ebb
Compatibility Fix: Do not load translations early (#9940)
RadoslavGeorgiev Dec 13, 2024
5064ccb
Add login confirmation check to ECE in Blocks (#9944)
cesarcosta99 Dec 13, 2024
6537f03
fix: tokenized cart error notice json (#9950)
frosso Dec 13, 2024
5e3b32e
Ensure WooPay ‘Enabled by Default’ Value Is Correctly Set In Sandbox …
lovo-h Dec 13, 2024
009bc44
Enable ECE for Virtual Variable Subscriptions with Free Trials (#9917)
asumaran Dec 13, 2024
cb65e92
Add support for utilizing NOX capabilities as URL parameters during a…
mordeth Dec 15, 2024
db8947f
Remove temporary transaction table search field CSS that was used for…
Jinksi Dec 15, 2024
7639bc4
Checkout: Fix error when wc_address_i18n_params does not have data fo…
danielmx-dev Dec 17, 2024
16603e3
Amend changelog entries for release 8.6.1
botwoo Dec 17, 2024
d409110
Revert "Amend changelog entries for release 8.6.1" (#9978)
tpaksu Dec 17, 2024
eb54bb9
Merge trunk v8.6.1 into develop
tpaksu Dec 17, 2024
0c7422e
Move Promise instantiation into memoized function to ensure caching c…
timur27 Dec 17, 2024
129fe05
Refresh page when ECE is dismissed (#9888)
rafaelzaleski Dec 17, 2024
cf6d2c1
Performance improvements for disputes reminder task list (#9906)
brucealdridge Dec 17, 2024
99db1fb
fix: tokenized cart w/ multiple variations (#9979)
frosso Dec 18, 2024
bf363d6
Improve message shown to merchants when there is an error capturing/c…
mgascam Dec 18, 2024
6639fe9
Set gateway method title when the title is defined (#9982)
timur27 Dec 18, 2024
efc8b58
fix: tokenized cart subscription signup fee price (#9951)
frosso Dec 18, 2024
8a7027f
Load checkout scripts when they are not previously loaded on checkout…
zmaglica Dec 18, 2024
5eaa046
Add failure reason to failed timeline events (#9980)
mgascam Dec 18, 2024
f1a21c8
Fix rounding problems with Level 3 data (#9991)
RadoslavGeorgiev Dec 19, 2024
7b6e7ef
Remove hooks from customer service constructor (#9992)
zmaglica Dec 19, 2024
5005b6b
Add seller_message to failed order notes (#9934)
htdat Dec 19, 2024
a648153
Use the filter param in server-side disputes CSV export (#9988)
jessy-p Dec 19, 2024
771e3ab
Enhance Embedded Components and MOX to support custom width and paddi…
mordeth Dec 19, 2024
e613931
Hide transaction fee on admin order view screen when transaction is n…
zmaglica Dec 19, 2024
7b22325
fix: tokenized ECE item compatibility w/ product bundles (#9994)
frosso Dec 19, 2024
863519d
Use "currency conversion fee" (#10002)
aheckler Dec 19, 2024
2176d63
Show ECE buttons on products w/o shipping tax included in price, and …
timur27 Dec 19, 2024
732ab92
Add WooPay Klaviyo newsletter integration (#9908)
alefesouza Dec 19, 2024
915fcc8
Fix FedEx shipping multi-currency rates (#9985)
ricardo Dec 19, 2024
779ef47
Translate hard coded strings in the fees tooltip breakdown (#10004)
mgascam Dec 20, 2024
3c7b115
Invalidate transactions store when transaction is captured (#10015)
zmaglica Dec 20, 2024
f0ebc14
Reduce API impact from test drive setup (#10014)
vladolaru Dec 20, 2024
3794508
Apply User-Defined Date Formatting Settings to WP Admin React Compone…
mgascam Dec 20, 2024
f6010a4
Show "postal code check" label based on store country (#9952)
cesarcosta99 Dec 20, 2024
3767447
Fix blank Overview page when WC onboarding is disabled (#10020)
vladolaru Dec 20, 2024
cd650bd
Show a beta badge next to WooPay theme checkbox (#10000)
malithsen Dec 20, 2024
34e3731
Enable Payment Methods preselected by NOX after onboarding accounts (…
mordeth Dec 20, 2024
23516e9
fix: tokenized ECE do not show button when missing billing email (#10…
frosso Dec 22, 2024
2ee2581
Update version and add changelog entries for release 8.7.0
github-actions[bot] Dec 22, 2024
7551fb2
Change stable tag to 8.6.1
tpaksu Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@ vendor/*
release/*
tests/e2e/docker*
tests/e2e/deps*

# We'll delete the directory and its contents as part of https://github.com/Automattic/woocommerce-payments/issues/9722 .
# ignoring it because we're temporariily cleaning it up.
client/tokenized-payment-request
3 changes: 1 addition & 2 deletions .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: PHP Compatibility

on:
#pull_request # Workflow disabled temporarily until PHP Compatibility fixes are in place
workflow_dispatch
pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,6 @@ tests/e2e-pw/playwright/.cache/
tests/e2e-pw/tests/e2e-pw/.auth/*
# Slate docs
docs/rest-api/build/*

# Jurassic Tube files
bin/jurassictube/
43 changes: 31 additions & 12 deletions bin/jurassic-tube-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,32 @@
# Exit if any command fails.
set -e

echo "Checking if ${PWD}/docker/bin/jt directory exists..."
# Define Jurassic Tube directory using bin directory
JT_DIR="${PWD}/bin/jurassictube"

if [ -d "${PWD}/docker/bin/jt" ]; then
echo "${PWD}/docker/bin/jt already exists."
echo "Checking if ${JT_DIR} directory exists..."

if [ -d "${JT_DIR}" ]; then
echo "${JT_DIR} already exists."
else
echo "Creating ${PWD}/docker/bin/jt directory..."
mkdir -p "${PWD}/docker/bin/jt"
echo "Creating ${JT_DIR} directory..."
mkdir -p "${JT_DIR}"
fi

echo "Downloading the latest version of the installer script..."
echo "Checking if the installer is present and downloading it if not..."
echo

# Download the installer (if it's not already present):
if [ ! -f "${PWD}/docker/bin/jt/installer.sh" ]; then
# Download the installer script:
curl "https://jurassic.tube/get-installer.php?env=wcpay" -o ${PWD}/docker/bin/jt/installer.sh && chmod +x ${PWD}/docker/bin/jt/installer.sh
if [ ! -f "${JT_DIR}/installer.sh" ]; then
echo "Downloading the standalone installer..."
curl "https://jurassic.tube/installer-standalone.sh" -o "${JT_DIR}/installer.sh" && chmod +x "${JT_DIR}/installer.sh"
fi

echo "Running the installation script..."
echo

# Run the installer script
source $PWD/docker/bin/jt/installer.sh
"${JT_DIR}/installer.sh"

echo
read -p "Go to https://jurassic.tube/ in a browser, paste your public key which was printed above into the box, and click 'Add Public Key'. Press enter to continue"
Expand All @@ -40,8 +43,24 @@ echo
read -p "Please enter your Automattic/WordPress.com username: " username
echo

${PWD}/docker/bin/jt/config.sh username ${username}
${PWD}/docker/bin/jt/config.sh subdomain ${subdomain}
if [ ! -f "${JT_DIR}/config.env" ]; then
touch "${JT_DIR}/config.env"
else
> "${JT_DIR}/config.env"
fi

# Find the WordPress container section and get its port
PORT=$(docker ps | grep woocommerce_payments_wordpress | sed -En "s/.*0:([0-9]+).*/\1/p")

# Use default if extraction failed
if [ -z "$PORT" ]; then
PORT=8082 # Default fallback
echo "Could not extract WordPress container port, using default: ${PORT}"
fi

echo "username=${username}" >> "${JT_DIR}/config.env"
echo "subdomain=${subdomain}" >> "${JT_DIR}/config.env"
echo "localhost=localhost:${PORT}" >> "${JT_DIR}/config.env"

echo "Setup complete!"
echo "Use the command: npm run tube:start from the root directory of your WC Payments project to start running Jurassic Tube."
Expand Down
61 changes: 61 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,66 @@
*** WooPayments Changelog ***

= 8.7.0 - 2024-12-25 =
* Add - Add seller_message to failed order notes
* Add - Add WooPay Klaviyo newsletter integration.
* Add - Clickwrap terms and conditions support on WooPay
* Add - Implement gateway method to retrieve recommended payment method.
* Add - Migrate active capabilities from test-drive account when switching to live account.
* Add - Refresh the cart and checkout pages when ECE is dismissed and the shipping options were modified in the payment sheet.
* Fix - Add a rounding entry to Level 3 data for rare cases where rounding errors break calculations.
* Fix - Added conditional use of Jetpack Config callback to avoid i18n notices.
* Fix - Browser error no longer shows after dispute evidence submission
* Fix - Ceil product prices after applying currency conversion, but before charm pricing and price rounding from settings is applied.
* Fix - Consider WooPay eligibility when retrieving WooPay enable state in the settings.
* Fix - Enable ECE for Virtual Variable Subscriptions with Free Trials.
* Fix - Ensure captured transactions appear in the Transactions tab without requiring a page refresh.
* Fix - Ensure ECE login confirmation dialog is shown on Blocks.
* Fix - Ensure WooPay 'enabled by default' value is correctly set in sandbox mode.
* Fix - Errors were incorrectly marked as info in logs.
* Fix - fix: undefined $cart_contains_subscription
* Fix - Fix blank Payments > Overview page when WC onboarding is disabled.
* Fix - Fixed Affirm using black logo on dark themes
* Fix - Fixed an issue where order metadata was not updated when capturing an order in the processing state.
* Fix - Fixed UPE country detection in Checkout for non-logged in users
* Fix - Fix filtering in async Disputes CSV export
* Fix - Fix inconsistent alignment of the download button across transactions, payouts, and disputes reporting views for a more cohesive user interface.
* Fix - Fix Jetpack onboarding URL query from "woocommerce-payments" to "woocommerce-core-profiler"
* Fix - Fix payment method filtering when billing country changes in Blocks checkout.
* Fix - Fix styling of transaction details page in mobile view.
* Fix - Hide transaction fee on admin view order screen when transaction is not captured.
* Fix - Load checkout scripts when they are not previously loaded on checkout page.
* Fix - Localize postal code check label based on country.
* Fix - Normalize HK addresses for ECE
* Fix - Order notes for inquiries have clearer content.
* Fix - Performance improvements for Disputes Needing Response task shown in WooCommerce admin.
* Fix - Remove translations during initialization, preventing unnecessary warnings.
* Fix - Restrict Stripe Link to credit card payment method and improve cleanup.
* Fix - Set payment method title once title is known.
* Fix - Show express checkout for products w/o shipping but where tax is included into price.
* Fix - Support 'type_is_in' filter for Transactions list report, to allow easy filtering by multiple types.
* Fix - Use "currency conversion fee" instead "foreign exchange fee" in payment timeline and various other places.
* Fix - Use translatable strings on the fee breakdown tooltip of the payment settings screen.
* Update - Add failure reason to failed payments in the timeline.
* Update - Add support for showing `In-Person (POS)` as the transaction channel for mobile POS transactions in wp-admin Payments, enhancing visibility in both transaction lists and details.
* Update - Adjust the go-live modal to match the latest design.
* Update - Apply User-Defined Date Formatting Settings to WP Admin React Components
* Update - Change 'Bank reference key' label to 'Bank reference ID' in Payouts list column for consistency.
* Update - chore: renamed PRB references in GooglePay/ApplePay implementation docs and logs files to ECE.
* Update - Ensure more robust selectors scoping to improve theme compatibility.
* Update - Make test instructions copy icon use the same color as the text next to it
* Update - Remove payout timing notice and update the help tooltil on Payments Overview page.
* Update - Update confirmation modal after onbarding
* Update - Update Embedded Components and MOX to support custom width and paddings.
* Update - Update error messages for payment authorization actions to provide more specific and user-friendly feedback.
* Update - Update Jetpack onboarding flow
* Update - WooPay theming copy in the settings page
* Dev - Add support for utilizing NOX capabilities as URL parameters during account creation.
* Dev - Enable Payment Methods preselected by NOX after onboarding accounts
* Dev - Fixing issue with parsing QIT authentication.Fixing issue with parsing QIT authentication.
* Dev - Refine verification for disabling ECE on subscriptions that require shipping.
* Dev - Remove hooks from customer and token services to dedicated methods
* Dev - Update the tunelling setup.

= 8.6.1 - 2024-12-17 =
* Fix - Checkout: Fix error when wc_address_i18n_params does not have data for a given country
* Fix - Skip mysqlcheck SSL Requirement during E2E environment setup
Expand Down
12 changes: 8 additions & 4 deletions client/capital/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import * as React from 'react';
import { __, _n } from '@wordpress/i18n';
import { TableCard } from '@woocommerce/components';
import { dateI18n } from '@wordpress/date';

/**
* Internal dependencies.
Expand All @@ -25,6 +24,8 @@ import Chip from 'components/chip';
import { useLoans } from 'wcpay/data';
import { getAdminUrl } from 'wcpay/utils';
import './style.scss';
import { formatDateTimeFromString } from 'wcpay/utils/date-time';
import DateFormatNotice from 'wcpay/components/date-format-notice';

const columns = [
{
Expand Down Expand Up @@ -80,7 +81,7 @@ const getLoanStatusText = ( loan: CapitalLoan ) => {
return loan.fully_paid_at
? __( 'Paid off', 'woocommerce-payments' ) +
': ' +
dateI18n( 'M j, Y', loan.fully_paid_at )
formatDateTimeFromString( loan.fully_paid_at )
: __( 'Active', 'woocommerce-payments' );
};

Expand Down Expand Up @@ -112,7 +113,9 @@ const getRowsData = ( loans: CapitalLoan[] ) =>
const data = {
paid_out_at: {
value: loan.paid_out_at,
display: clickable( dateI18n( 'M j, Y', loan.paid_out_at ) ),
display: clickable(
formatDateTimeFromString( loan.paid_out_at )
),
},
status: {
value: getLoanStatusText( loan ),
Expand Down Expand Up @@ -150,7 +153,7 @@ const getRowsData = ( loans: CapitalLoan[] ) =>
value: loan.first_paydown_at,
display: clickable(
loan.first_paydown_at
? dateI18n( 'M j, Y', loan.first_paydown_at )
? formatDateTimeFromString( loan.first_paydown_at )
: '-'
),
},
Expand Down Expand Up @@ -207,6 +210,7 @@ const CapitalPage = (): JSX.Element => {

return (
<Page>
<DateFormatNotice />
<TestModeNotice currentPage="loans" />

{ wcpaySettings.accountLoans.has_active_loan && (
Expand Down
48 changes: 48 additions & 0 deletions client/capital/test/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,54 @@ exports[`CapitalPage renders the TableCard component with loan data 1`] = `
<div
class=" woocommerce-payments-page"
>
<div
class="date-format-notice wcpay-banner-notice is-info"
>
<svg
aria-hidden="true"
class="wcpay-banner-notice__icon"
focusable="false"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"
/>
</svg>
<div
class="wcpay-banner-notice__content"
>
The date and time formats now match your preferences. You can update them anytime in the
<a
data-link-type="external"
href="/wp-admin/options-general.php"
>
settings
</a>
.
</div>
<button
aria-label="Dismiss this notice"
class="components-button wcpay-banner-notice__dismiss has-icon"
type="button"
>
<svg
class="gridicon gridicons-cross-small"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<g>
<path
d="M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"
/>
</g>
</svg>
</button>
</div>
<div
class="wcpay-banner-notice is-warning"
>
Expand Down
2 changes: 2 additions & 0 deletions client/capital/test/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ declare const global: {
accountLoans: {
has_active_loan: boolean;
};
dateFormat: string;
};
};

Expand All @@ -37,6 +38,7 @@ describe( 'CapitalPage', () => {
},
accountLoans: { has_active_loan: true },
testMode: true,
dateFormat: 'M j, Y',
};
} );

Expand Down
3 changes: 3 additions & 0 deletions client/checkout/api/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const mockAppearance = {
'.Button': {},
'.Link': {},
'.Container': {},
'.Footer': {},
'.Footer-link': {},
'.Header': {},
},
theme: 'stripe',
variables: {
Expand Down
2 changes: 0 additions & 2 deletions client/checkout/blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const upeMethods = {
};

const enabledPaymentMethodsConfig = getUPEConfig( 'paymentMethodsConfig' );
const upeAppearanceTheme = getUPEConfig( 'wcBlocksUPEAppearanceTheme' );
const isStripeLinkEnabled = isLinkEnabled( enabledPaymentMethodsConfig );

// Create an API object, which will be used throughout the checkout.
Expand Down Expand Up @@ -116,7 +115,6 @@ Object.entries( enabledPaymentMethodsConfig )
iconLight={ upeConfig.icon }
iconDark={ upeConfig.darkIcon }
upeName={ upeName }
upeAppearanceTheme={ upeAppearanceTheme }
/>
),
ariaLabel: 'WooPayments',
Expand Down
14 changes: 5 additions & 9 deletions client/checkout/blocks/payment-method-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,15 @@ const PaymentMethodMessageWrapper = ( {
);
};

export default ( {
api,
title,
countries,
iconLight,
iconDark,
upeName,
upeAppearanceTheme,
} ) => {
export default ( { api, title, countries, iconLight, iconDark, upeName } ) => {
const cartData = wp.data.select( 'wc/store/cart' ).getCartData();
const isTestMode = getUPEConfig( 'testMode' );
const [ appearance, setAppearance ] = useState(
getUPEConfig( 'wcBlocksUPEAppearance' )
);
const [ upeAppearanceTheme, setUpeAppearanceTheme ] = useState(
getUPEConfig( 'wcBlocksUPEAppearanceTheme' )
);

// Stripe expects the amount to be sent as the minor unit of 2 digits.
const amount = parseInt(
Expand All @@ -86,6 +81,7 @@ export default ( {
'blocks_checkout'
);
setAppearance( upeAppearance );
setUpeAppearanceTheme( upeAppearance.theme );
}

if ( ! appearance ) {
Expand Down
Loading
Loading