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 6.6.2 #7524

Merged
merged 4 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
172 changes: 84 additions & 88 deletions assets/images/payment-methods/all_local_payments.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
183 changes: 92 additions & 91 deletions assets/images/payment-methods/local_payments.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
*** WooPayments Changelog ***

= 6.6.2 - 2023-10-20 =
* Fix - Fix PSR container conflicts
* Update - Deprecate Sofort for any merchants who have not enabled it. Warn existing merchants about future deprecation.

= 6.6.1 - 2023-10-19 =
* Fix - Fix Documents page loading on WooCommerce 8.2.0.
* Fix - Stripe Link eligibility at checkout
Expand Down
19 changes: 14 additions & 5 deletions client/components/payment-methods-list/payment-method.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
.payment-method {
.payment-method__list-item {
display: flex;
flex-direction: column;
margin: 0;
padding: 24px;

&:not( :last-child ) {
box-shadow: inset 0 -1px 0 #e8eaeb;
}

& .sofort__notice {
margin-top: 20px;
}
}

.payment-method {
display: flex;
background: #fff;
justify-content: space-between;
align-items: center;
Expand All @@ -10,10 +23,6 @@
flex-wrap: nowrap;
}

&:not( :last-child ) {
box-shadow: inset 0 -1px 0 #e8eaeb;
}

&__text {
flex: 1 1 100%;
order: 1;
Expand Down
154 changes: 91 additions & 63 deletions client/components/payment-methods-list/payment-method.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import Chip from '../chip';
import LoadableCheckboxControl from '../loadable-checkbox';
import { getDocumentationUrlForDisabledPaymentMethod } from '../payment-method-disabled-tooltip';
import Pill from '../pill';
import InlineNotice from '../inline-notice';
import './payment-method.scss';

interface PaymentMethodProps {
Expand Down Expand Up @@ -127,6 +128,8 @@ const PaymentMethod = ( {
upeCapabilityStatuses.PENDING_VERIFICATION,
].includes( status );

const shouldDisplayNotice = id === 'sofort';

const needsOverlay =
( isManualCaptureEnabled && ! isAllowingManualCapture ) ||
isSetupRequired ||
Expand Down Expand Up @@ -209,83 +212,108 @@ const PaymentMethod = ( {
return (
<li
className={ classNames(
'payment-method',
'payment-method__list-item',
{ 'has-icon-border': id !== 'card' },
{ overlay: needsOverlay },
className
) }
>
<div className="payment-method__checkbox">
<LoadableCheckboxControl
label={ label }
checked={ checked }
disabled={ disabled || locked }
onChange={ handleChange }
delayMsOnCheck={ 1500 }
delayMsOnUncheck={ 0 }
hideLabel
isAllowingManualCapture={ isAllowingManualCapture }
isSetupRequired={ isSetupRequired }
setupTooltip={ getTooltipContent( id ) as any }
needsAttention={ needsAttention }
/>
</div>
<div className="payment-method__text-container">
<div className="payment-method__icon">
<Icon />
</div>
<div className="payment-method__label payment-method__label-mobile">
<PaymentMethodLabel
<div className="payment-method">
<div className="payment-method__checkbox">
<LoadableCheckboxControl
label={ label }
required={ required }
status={ status }
disabled={ disabled }
checked={ checked }
disabled={ disabled || locked }
onChange={ handleChange }
delayMsOnCheck={ 1500 }
delayMsOnUncheck={ 0 }
hideLabel
isAllowingManualCapture={ isAllowingManualCapture }
isSetupRequired={ isSetupRequired }
setupTooltip={ getTooltipContent( id ) as any }
needsAttention={ needsAttention }
/>
</div>
<div className="payment-method__text">
<div className="payment-method__label-container">
<div className="payment-method__label payment-method__label-desktop">
<PaymentMethodLabel
label={ label }
required={ required }
status={ status }
disabled={ disabled }
/>
</div>
<div className="payment-method__description">
{ description }
</div>
<div className="payment-method__text-container">
<div className="payment-method__icon">
<Icon />
</div>
<div className="payment-method__label payment-method__label-mobile">
<PaymentMethodLabel
label={ label }
required={ required }
status={ status }
disabled={ disabled }
/>
</div>
{ accountFees && accountFees[ id ] && (
<div className="payment-method__fees">
<HoverTooltip
maxWidth={ '300px' }
content={ formatMethodFeesTooltip(
accountFees[ id ]
) }
>
<Pill
aria-label={ sprintf(
__(
'Base transaction fees: %s',
'woocommerce-payments'
),
formatMethodFeesDescription(
accountFees[ id ]
)
<div className="payment-method__text">
<div className="payment-method__label-container">
<div className="payment-method__label payment-method__label-desktop">
<PaymentMethodLabel
label={ label }
required={ required }
status={ status }
disabled={ disabled }
/>
</div>
<div className="payment-method__description">
{ description }
</div>
</div>
{ accountFees && accountFees[ id ] && (
<div className="payment-method__fees">
<HoverTooltip
maxWidth={ '300px' }
content={ formatMethodFeesTooltip(
accountFees[ id ]
) }
>
<span>
{ formatMethodFeesDescription(
accountFees[ id ]
<Pill
aria-label={ sprintf(
__(
'Base transaction fees: %s',
'woocommerce-payments'
),
formatMethodFeesDescription(
accountFees[ id ]
)
) }
</span>
</Pill>
</HoverTooltip>
</div>
) }
>
<span>
{ formatMethodFeesDescription(
accountFees[ id ]
) }
</span>
</Pill>
</HoverTooltip>
</div>
) }
</div>
</div>
</div>
{ shouldDisplayNotice && (
<InlineNotice
status="warning"
icon={ true }
isDismissible={ false }
className="sofort__notice"
>
<span>
{ __(
'Support for Sofort is ending soon. ',
'woocommerce-payments'
) }
<a
// eslint-disable-next-line max-len
href="https://woocommerce.com/document/woopayments/payment-methods/additional-payment-methods/#sofort-deprecation"
target="_blank"
rel="external noreferrer noopener"
>
{ __( 'Learn more', 'woocommerce-payments' ) }
</a>
</span>
</InlineNotice>
) }
</li>
);
};
Expand Down
2 changes: 0 additions & 2 deletions client/connect-account-page/payment-methods.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import DinersClub from 'assets/images/cards/diners.svg?asset';
import GooglePay from 'assets/images/cards/google-pay.svg?asset';
import JCB from 'assets/images/cards/jcb.svg?asset';
import MasterCard from 'assets/images/cards/mastercard.svg?asset';
import Sofort from 'assets/images/payment-methods/sofort.svg?asset';
import UnionPay from 'assets/images/cards/unionpay.svg?asset';
import Visa from 'assets/images/cards/visa.svg?asset';
import WooPay from 'assets/images/payment-methods/woopay.svg?asset';
Expand All @@ -37,7 +36,6 @@ const PaymentMethods: React.FC = () => {
<img src={ DinersClub } alt="DinersClub" />
<img src={ UnionPay } alt="UnionPay" />
<img src={ JCB } alt="JCB" />
<img src={ Sofort } alt="Sofort" />
<img src={ Affirm } alt="Affirm" />
<img src={ AfterPay } alt="AfterPay" />
<span>& more.</span>
Expand Down
2 changes: 1 addition & 1 deletion client/connect-account-page/strings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
firstName ? ` ${ firstName }` : ''
),
usp1: __(
'Offer card payments, Apple Pay, Sofort, iDeal, Affirm, Afterpay, and accept in-person payments with the Woo mobile app.',
'Offer card payments, Apple Pay, iDeal, Affirm, Afterpay, and accept in-person payments with the Woo mobile app.',
'woocommerce-payments'
),
usp2: __(
Expand Down
18 changes: 3 additions & 15 deletions client/connect-account-page/test/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ exports[`ConnectAccountPage should render correctly 1`] = `
fill-rule="evenodd"
/>
</svg>
Offer card payments, Apple Pay, Sofort, iDeal, Affirm, Afterpay, and accept in-person payments with the Woo mobile app.
Offer card payments, Apple Pay, iDeal, Affirm, Afterpay, and accept in-person payments with the Woo mobile app.
<svg
class="gridicon gridicons-globe"
height="24"
Expand Down Expand Up @@ -148,10 +148,6 @@ exports[`ConnectAccountPage should render correctly 1`] = `
alt="JCB"
src="assets/images/cards/jcb.svg"
/>
<img
alt="Sofort"
src="assets/images/payment-methods/sofort.svg"
/>
<img
alt="Affirm"
src="assets/images/payment-methods/affirm.svg"
Expand Down Expand Up @@ -361,7 +357,7 @@ exports[`ConnectAccountPage should render correctly with WooPay eligible 1`] = `
fill-rule="evenodd"
/>
</svg>
Offer card payments, Apple Pay, Sofort, iDeal, Affirm, Afterpay, and accept in-person payments with the Woo mobile app.
Offer card payments, Apple Pay, iDeal, Affirm, Afterpay, and accept in-person payments with the Woo mobile app.
<svg
class="gridicon gridicons-globe"
height="24"
Expand Down Expand Up @@ -477,10 +473,6 @@ exports[`ConnectAccountPage should render correctly with WooPay eligible 1`] = `
alt="JCB"
src="assets/images/cards/jcb.svg"
/>
<img
alt="Sofort"
src="assets/images/payment-methods/sofort.svg"
/>
<img
alt="Affirm"
src="assets/images/payment-methods/affirm.svg"
Expand Down Expand Up @@ -652,7 +644,7 @@ exports[`ConnectAccountPage should render correctly with an incentive 1`] = `
fill-rule="evenodd"
/>
</svg>
Offer card payments, Apple Pay, Sofort, iDeal, Affirm, Afterpay, and accept in-person payments with the Woo mobile app.
Offer card payments, Apple Pay, iDeal, Affirm, Afterpay, and accept in-person payments with the Woo mobile app.
<svg
class="gridicon gridicons-globe"
height="24"
Expand Down Expand Up @@ -756,10 +748,6 @@ exports[`ConnectAccountPage should render correctly with an incentive 1`] = `
alt="JCB"
src="assets/images/cards/jcb.svg"
/>
<img
alt="Sofort"
src="assets/images/payment-methods/sofort.svg"
/>
<img
alt="Affirm"
src="assets/images/payment-methods/affirm.svg"
Expand Down
28 changes: 27 additions & 1 deletion client/payment-methods/delete-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import interpolateComponents from '@automattic/interpolate-components';
*/
import PaymentDeleteIllustration from '../components/payment-delete-illustration';
import ConfirmationModal from '../components/confirmation-modal';
import InlineNotice from 'wcpay/components/inline-notice';

const ConfirmPaymentMethodDeleteModal: React.FunctionComponent< {
id: string;
Expand All @@ -20,6 +21,8 @@ const ConfirmPaymentMethodDeleteModal: React.FunctionComponent< {
onConfirm: () => void;
onCancel: () => void;
} > = ( { id, label, icon: Icon, onConfirm, onCancel } ): JSX.Element => {
const shouldDisplayNotice = id === 'sofort';

return (
<ConfirmationModal
title={ sprintf(
Expand Down Expand Up @@ -65,7 +68,7 @@ const ConfirmPaymentMethodDeleteModal: React.FunctionComponent< {
<p>
{ interpolateComponents( {
mixedString: __(
'You can add it again at any time in {{wooCommercePaymentsLink /}}',
'You can add it again at any time in {{wooCommercePaymentsLink /}}.',
'woocommerce-payments'
),
components: {
Expand All @@ -77,6 +80,29 @@ const ConfirmPaymentMethodDeleteModal: React.FunctionComponent< {
},
} ) }
</p>
{ shouldDisplayNotice && (
<InlineNotice
status="warning"
icon={ true }
isDismissible={ false }
className="sofort__notice"
>
<span>
{ __(
'As of October 20th 2023, Sofort is no longer supported for merchants who are not already using it. This means that if you disable Sofort, you will not be able to re-enable it later. ',
'woocommerce-payments'
) }
<a
// eslint-disable-next-line max-len
href="https://woocommerce.com/document/woopayments/payment-methods/additional-payment-methods/#sofort-deprecation"
target="_blank"
rel="external noreferrer noopener"
>
{ __( 'Learn more', 'woocommerce-payments' ) }
</a>
</span>
</InlineNotice>
) }
</ConfirmationModal>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ exports[`Activation Modal matches the snapshot 1`] = `
>
WooPayments
</a>
.
</p>
<hr
class="wcpay-confirmation-modal__separator"
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"automattic/jetpack-autoloader": "2.11.18",
"automattic/jetpack-identity-crisis": "0.8.43",
"automattic/jetpack-sync": "1.47.7",
"woocommerce/subscriptions-core": "6.3.0",
"psr/container": "^1.1"
"woocommerce/subscriptions-core": "6.3.0"
},
"require-dev": {
"composer/installers": "1.10.0",
Expand Down
Loading
Loading