diff --git a/.eslintrc b/.eslintrc index 4b37af1e0ff..6d23537432e 100644 --- a/.eslintrc +++ b/.eslintrc @@ -102,6 +102,10 @@ { "selector": "ImportDeclaration[source.value=/gridicons(?!\\u002F)/]", "message": "Do not import whole Gridicons, import them individually with 'gridicons/dist/icon-name'." + }, + { + "selector": "ImportDeclaration[source.value='@wordpress/components']", + "message": "Do not import from '@wordpress/components' directly. Use components from 'wcpay/components/wp-components-wrapped' instead." } ] }, diff --git a/.gitignore b/.gitignore index 771eaf83908..c47e9cf4921 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ project.properties *.sublime-workspace .sublimelinterrc .cursor/ +.claude/ +.zed/ +.phpactor.json # Bundle dist diff --git a/assets/images/dispute-evidence-submitted.svg b/assets/images/dispute-evidence-submitted.svg new file mode 100644 index 00000000000..96e69e722f4 --- /dev/null +++ b/assets/images/dispute-evidence-submitted.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/changelog.txt b/changelog.txt index 1d541126c35..02b7d128ceb 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,65 @@ *** WooPayments Changelog *** += 9.7.0 - 2025-07-24 = +* Add - Add a confirmation screen to the new flow for submitting dispute evidence. +* Add - Add Credit not processed logic for the new evidence submission form. +* Add - Add external help link to the recomended documents section. +* Add - Add logic for Duplicate chargeback reason for the new evidence submission form. +* Add - Add logic for subscription cancelled for the new evidence form. +* Add - Add new transaction type fee_refund +* Add - File name should show size the extension +* Add - New evidence flow for the "General" dispute type. +* Fix - Accept TAP_TO_PAY_DEVICE as a valid card reader model to consider a transaction as TTP. +* Fix - Adjusted deactivation modal behavior to correctly resize when its content updates. +* Fix - Change copy to avoid leaving words alone. +* Fix - Consolidate test account notices in one in the WooPayments Settings page. +* Fix - Enable WooPay Direct Checkout on mini-cart. +* Fix - Fix - Remove unwanted animations and improve styling consistency on dispute evidence pages. +* Fix - Fix: Allow multiple authorization cancellations on the same order. +* Fix - Fix: Google Pay 3D Secure authentication being bypassed due to redirect URL extraction issue +* Fix - fix: remove BNPLs from PMME when BNPL method is not active +* Fix - Fix: Spinner alignment issues in cart checkout button and checkout address form email field. +* Fix - Fix border color of some items. +* Fix - Fix copy for the documents section and fix the font size of the content inside the accordion on top. +* Fix - Fix filename issue on the new evidence submission form. +* Fix - Fix margin of the shipping details title on the evidence submission form. +* Fix - Fix order notes after subscriptions' payment method gets changed. +* Fix - Fix spacings on the envidence submission form +* Fix - Fix vertical UI shift when uploading a file +* Fix - Fix WooPay button spinner on some themes. +* Fix - Improve the cover letter save behavior. +* Fix - Provide correct language code when requesting CSV exports in a region-specific language +* Fix - Remove unnecessary gap +* Fix - Step back should also scroll the page to the top +* Fix - Support numbers starting from 4, 7, 8 for Hong Kong phones. +* Update - Disallow challenging the Visa compliance disputes. +* Update - ensure payments and transactions pages uses wp components that come with the WP installation. +* Update - Improve multicurrency caching and use new API endpoint. +* Update - Make the card reaaders page use the wp.components available in the WordPress installation. +* Update - Redirect merchant to the dispute detail screen +* Update - Redirects to the dispute list after save. +* Update - Removes the feature flag for the new evidence submission form. +* Update - update: deactivation survey to use WP components bundled within the WP installation +* Update - update: ensure multi-currency settings page uses wp components that come with the WP installation; updated some styles to use WP components, rather than bespoke components; +* Update - update: ensure settings page uses wp components that come with the WP installation +* Update - update: multi-currency widget to use WP components bundled within the WP installation +* Update - update: order page assets with wp components +* Update - update: RedirectToTransactionDetails to use Gutenberg components that come with the WP installation +* Update - update: removed the payment gateways confirmation dialog +* Update - update: subscription-product-onboarding to use WP components bundled within the WP installation +* Update - update: TOS agreement dialog to use WP Components bundled within the WP installation +* Update - Update client to use NOX surfaces instead of MOX/Connect page wherever possible. +* Update - Update copy for disputes +* Update - Update Multi-currency settings to use wp.components available in the WordPress installation. +* Update - Update the payments overview page to use the components available in the WP installation. +* Update - Update the payout list and payout details pages to use the WP components available on the WP installation. +* Dev - Fix imports for the unbundled components. +* Dev - Prevent "Evidence saved" toast from appearing multiple times. +* Dev - Remove conversion to the server locale, as it is done on the server. +* Dev - Remove feature flag _wcpay_feature_documents +* Dev - Remove old evidence submission code +* Dev - update: ensure `wp-components-wrapped` has individually exported components + = 9.6.0 - 2025-07-02 = * Add - Add cover letter for the new evidence submission screen for Product Unacceptable chargeback reason * Add - Added a URL parameter to allow merchants to access the VAT details modal. diff --git a/client/card-readers/index.tsx b/client/card-readers/index.tsx index 4b2fe9b89cb..9f6d83e74e8 100644 --- a/client/card-readers/index.tsx +++ b/client/card-readers/index.tsx @@ -11,7 +11,7 @@ import { __ } from '@wordpress/i18n'; */ import Page from 'components/page'; import ReadersList from './list'; -import { TabPanel } from '@wordpress/components'; +import { TabPanel } from 'wcpay/components/wp-components-wrapped/components/tab-panel'; import './style.scss'; diff --git a/client/card-readers/list/index.tsx b/client/card-readers/list/index.tsx index 2b0c4b52ee0..f8e1824ec6d 100644 --- a/client/card-readers/list/index.tsx +++ b/client/card-readers/list/index.tsx @@ -4,11 +4,13 @@ */ import React from 'react'; import { __, sprintf } from '@wordpress/i18n'; -import { Card, CardBody, CardDivider } from '@wordpress/components'; /** * Internal dependencies */ +import { Card } from 'wcpay/components/wp-components-wrapped/components/card'; +import { CardBody } from 'wcpay/components/wp-components-wrapped/components/card-body'; +import { CardDivider } from 'wcpay/components/wp-components-wrapped/components/card-divider'; import SettingsSection from 'wcpay/settings/settings-section'; import SettingsLayout from 'wcpay/settings/settings-layout'; import LoadableSettingsSection from 'wcpay/settings/loadable-settings-section'; diff --git a/client/cart/blocks/index.js b/client/cart/blocks/index.js index d00195c1abe..ba34c4b9c27 100644 --- a/client/cart/blocks/index.js +++ b/client/cart/blocks/index.js @@ -2,6 +2,7 @@ * Internal dependencies */ import { renderBNPLCartMessaging } from './product-details'; +import './style.scss'; const { registerPlugin } = window.wp.plugins; diff --git a/client/cart/blocks/style.scss b/client/cart/blocks/style.scss new file mode 100644 index 00000000000..29dbb60399c --- /dev/null +++ b/client/cart/blocks/style.scss @@ -0,0 +1,19 @@ +/** + * Cart Blocks Styles + * + * This file contains styles specific to WooCommerce cart blocks + * and WCPay integrations within the cart context. + */ + +/** + * Fix for cart submit button spinner alignment + */ +.wc-block-cart__submit-button .wc-block-components-button__text { + position: relative; + + .wc-block-components-spinner { + /* Override the base style's top/left: initial */ + top: 0; + left: 0; + } +} diff --git a/client/checkout/woopay/style.scss b/client/checkout/woopay/style.scss index 51ae95e9b5d..d6dc0d99dae 100644 --- a/client/checkout/woopay/style.scss +++ b/client/checkout/woopay/style.scss @@ -24,6 +24,21 @@ } } +/* Fix for address form email field spinner alignment */ +.wc-block-components-address-form__email { + position: relative; + + .wc-block-components-spinner { + /* Override the base style's top/left: initial */ + top: 50%; + left: auto; + right: 10px; + width: 24px; + height: 24px; + transform: translateY( -50% ); + } +} + .woopay-login-session-iframe { width: 100%; height: 100vh; @@ -150,6 +165,8 @@ box-sizing: content-box; text-align: center; font-size: 1.25em; + top: initial; + left: initial; &::after { content: ' '; diff --git a/client/components/accordion/body.tsx b/client/components/accordion/body.tsx index 61eb8a7358a..c01e03501b4 100644 --- a/client/components/accordion/body.tsx +++ b/client/components/accordion/body.tsx @@ -3,9 +3,6 @@ */ import clsx from 'clsx'; import React, { useEffect, useRef, useState, forwardRef } from 'react'; -/** - * WordPress dependencies - */ import { useMergeRefs } from '@wordpress/compose'; /** diff --git a/client/components/accordion/title.tsx b/client/components/accordion/title.tsx index 4b6b97ace60..590e3a8f400 100644 --- a/client/components/accordion/title.tsx +++ b/client/components/accordion/title.tsx @@ -3,17 +3,15 @@ */ import React, { forwardRef } from 'react'; import clsx from 'clsx'; -/** - * WordPress dependencies - */ import { chevronUp, chevronDown } from '@wordpress/icons'; +import { Icon } from 'wcpay/components/wp-components-wrapped/components/icon'; +import { Button } from 'wcpay/components/wp-components-wrapped/components/button'; /** * Internal dependencies */ import type { AccordionTitleProps } from './types'; import type { WordPressComponentProps } from '@wordpress/components/ui/context/wordpress-component'; -import { Button, Icon } from 'wcpay/components/wp-components-wrapped'; import AccordionSubtitle from './subtitle'; import './style.scss'; @@ -36,6 +34,7 @@ const AccordionTitle = forwardRef< 'is-md': md, 'is-lg': lg, } ) } + // @ts-expect-error: there is a type discrepancy between the wrapped WP components and the bundled components. ref={ ref } { ...props } > @@ -45,6 +44,7 @@ const AccordionTitle = forwardRef< */ }