diff --git a/changelog.txt b/changelog.txt
index 18c98319d74..73e649d188e 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,11 @@
*** WooPayments Changelog ***
+= 6.9.2 - 2023-12-14 =
+* Add - Notice is added when merchant has funds that are not yet available for deposit.
+* Add - Show a deposit schedule notice on the deposits list page to indicate that future deposits can be expected.
+* Fix - Show deposit schedule message when deposits are unrestricted
+* Fix - Transactions List - indicate when a transaction is expected to be included in a future deposit
+
= 6.9.1 - 2023-12-07 =
* Fix - Display Klarna & Afterpay on the checkout for UK based stores
diff --git a/changelog/add-7591-missing-columns-export-csv b/changelog/add-7591-missing-columns-export-csv
new file mode 100644
index 00000000000..668644d2cfc
--- /dev/null
+++ b/changelog/add-7591-missing-columns-export-csv
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Introduce Customer currency, Deposit currency, Amount in Customer Currency and Deposit ID columns to the Transaction list UI and CSV export
diff --git a/changelog/cleanup-redundant-script-enqueueing b/changelog/cleanup-redundant-script-enqueueing
new file mode 100644
index 00000000000..20c952d459e
--- /dev/null
+++ b/changelog/cleanup-redundant-script-enqueueing
@@ -0,0 +1,4 @@
+Significance: minor
+Type: dev
+
+Cleanup enqueueing of the scripts which were removed
diff --git a/changelog/update-4163-compatibility-service b/changelog/update-4163-compatibility-service
new file mode 100644
index 00000000000..3a524da05ae
--- /dev/null
+++ b/changelog/update-4163-compatibility-service
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Adding Compatibility Service to assist with flagging possible compatibility issues in the future.
diff --git a/client/components/deposits-overview/deposit-notices.tsx b/client/components/deposits-overview/deposit-notices.tsx
index 7a38783a33b..86f0de918a0 100644
--- a/client/components/deposits-overview/deposit-notices.tsx
+++ b/client/components/deposits-overview/deposit-notices.tsx
@@ -150,3 +150,28 @@ export const NegativeBalanceDepositsPausedNotice: React.FC = () => (
} ) }
);
+
+/**
+ * Renders a notice informing the user that deposits only occur when there are funds available.
+ */
+export const NoFundsAvailableForDepositNotice: React.FC = () => (
+
+ { interpolateComponents( {
+ mixedString: __(
+ 'You have no funds available to deposit. {{whyLink}}Why?{{/whyLink}}',
+ 'woocommerce-payments'
+ ),
+ components: {
+ whyLink: (
+ // Link content is in the format string above. Consider disabling jsx-a11y/anchor-has-content.
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
+
+ ),
+ },
+ } ) }
+
+);
diff --git a/client/components/deposits-overview/deposit-schedule.tsx b/client/components/deposits-overview/deposit-schedule.tsx
index c7eae7bca78..8ae6546655c 100644
--- a/client/components/deposits-overview/deposit-schedule.tsx
+++ b/client/components/deposits-overview/deposit-schedule.tsx
@@ -17,6 +17,7 @@ import type * as AccountOverview from 'wcpay/types/account-overview';
interface DepositScheduleProps {
depositsSchedule: AccountOverview.Account[ 'deposits_schedule' ];
+ showNextDepositDate?: boolean;
}
/**
* Renders the Deposit Schedule details component.
@@ -25,19 +26,30 @@ interface DepositScheduleProps {
*/
const DepositSchedule: React.FC< DepositScheduleProps > = ( {
depositsSchedule,
+ showNextDepositDate,
} ) => {
const nextDepositDate = getNextDepositDate( depositsSchedule );
+ const nextDepositDateString = showNextDepositDate
+ ? sprintf(
+ /** translators: %s: is the date of the next deposit, e.g. "January 1st, 2023". */
+ __(
+ ' – your next deposit is scheduled for {{strong}}%s{{/strong}}',
+ 'woocommerce-payments'
+ ),
+ nextDepositDate
+ )
+ : '';
switch ( depositsSchedule.interval ) {
case 'daily':
return interpolateComponents( {
mixedString: sprintf(
- /** translators: {{strong}}: placeholders are opening and closing strong tags. %s: is the date of the next deposit, e.g. "January 1st, 2023". */
+ /** translators: {{strong}}: placeholders are opening and closing strong tags. %s: is an optional next deposit date message. */
__(
- 'Available funds are automatically dispatched {{strong}}every day{{/strong}} – your next deposit is scheduled for {{strong}}%s{{/strong}}.',
+ 'Available funds are automatically dispatched {{strong}}every day{{/strong}}%s.',
'woocommerce-payments'
),
- nextDepositDate
+ nextDepositDateString
),
components: {
strong: ,
@@ -52,13 +64,13 @@ const DepositSchedule: React.FC< DepositScheduleProps > = ( {
return interpolateComponents( {
mixedString: sprintf(
- /** translators: %1$s: is the day of the week. eg "Friday". %2$s: is the date of the next deposit, e.g. "January 1st, 2023". {{strong}}: placeholders are opening and closing strong tags. */
+ /** translators: %1$s: is the day of the week. eg "Friday". %2$s: is an optional next deposit date message. {{strong}}: placeholders are opening and closing strong tags. */
__(
- 'Available funds are automatically dispatched {{strong}}every %1$s{{/strong}} – your next deposit is scheduled for {{strong}}%2$s{{/strong}}.',
+ 'Available funds are automatically dispatched {{strong}}every %1$s{{/strong}}%2$s.',
'woocommerce-payments'
),
dayOfWeek,
- nextDepositDate
+ nextDepositDateString
),
components: {
strong: ,
@@ -71,12 +83,12 @@ const DepositSchedule: React.FC< DepositScheduleProps > = ( {
if ( monthlyAnchor === 31 ) {
return interpolateComponents( {
mixedString: sprintf(
- /** translators: {{strong}}: placeholders are opening and closing strong tags. %s: is the date of the next deposit, e.g. "January 1st, 2023". */
+ /** translators: {{strong}}: placeholders are opening and closing strong tags. %s: is an optional next deposit date message. */
__(
- 'Available funds are automatically dispatched {{strong}}on the last day of every month{{/strong}} – your next deposit is scheduled for {{strong}}%s{{/strong}}.',
+ 'Available funds are automatically dispatched {{strong}}on the last day of every month{{/strong}}%s.',
'woocommerce-payments'
),
- nextDepositDate
+ nextDepositDateString
),
components: {
strong: ,
@@ -86,16 +98,16 @@ const DepositSchedule: React.FC< DepositScheduleProps > = ( {
return interpolateComponents( {
mixedString: sprintf(
- /** translators: {{strong}}: placeholders are opening and closing strong tags. %1$s: is the day of the month. eg "31st". %2$s: is the date of the next deposit, e.g. "January 1st, 2023". */
+ /** translators: {{strong}}: placeholders are opening and closing strong tags. %1$s: is the day of the month. eg "31st". %2$s: is an optional next deposit date message. */
__(
- 'Available funds are automatically dispatched {{strong}}on the %1$s of every month{{/strong}} – your next deposit is scheduled for {{strong}}%2$s{{/strong}}.',
+ 'Available funds are automatically dispatched {{strong}}on the %1$s of every month{{/strong}}%2$s.',
'woocommerce-payments'
),
getDepositMonthlyAnchorLabel( {
monthlyAnchor: monthlyAnchor,
capitalize: false,
} ),
- nextDepositDate
+ nextDepositDateString
),
components: {
strong: ,
diff --git a/client/components/deposits-overview/index.tsx b/client/components/deposits-overview/index.tsx
index 27c754c0640..8ab797f4977 100644
--- a/client/components/deposits-overview/index.tsx
+++ b/client/components/deposits-overview/index.tsx
@@ -24,6 +24,7 @@ import {
DepositTransitDaysNotice,
NegativeBalanceDepositsPausedNotice,
NewAccountWaitingPeriodNotice,
+ NoFundsAvailableForDepositNotice,
SuspendedDepositNotice,
} from './deposit-notices';
import useRecentDeposits from './hooks';
@@ -35,6 +36,9 @@ const DepositsOverview: React.FC = () => {
overview,
isLoading: isLoadingOverview,
} = useSelectedCurrencyOverview();
+ const isDepositsUnrestricted =
+ wcpaySettings.accountStatus.deposits?.restrictions ===
+ 'deposits_unrestricted';
const selectedCurrency =
overview?.currency || wcpaySettings.accountDefaultCurrency;
const { isLoading: isLoadingDeposits, deposits } = useRecentDeposits(
@@ -44,20 +48,18 @@ const DepositsOverview: React.FC = () => {
const isLoading = isLoadingOverview || isLoadingDeposits;
const availableFunds = overview?.available?.amount ?? 0;
+ const pendingFunds = overview?.pending?.amount ?? 0;
- // If the account has deposits blocked, there is no available balance or it is negative, there is no future deposit expected.
- const isNextDepositExpected =
- ! account?.deposits_blocked && availableFunds > 0;
// If the available balance is negative, deposits may be paused.
const isNegativeBalanceDepositsPaused = availableFunds < 0;
+ // When there are funds pending but no available funds, deposits are paused.
+ const isDepositAwaitingPendingFunds =
+ availableFunds === 0 && pendingFunds > 0;
const hasCompletedWaitingPeriod =
wcpaySettings.accountStatus.deposits?.completed_waiting_period;
// Only show the deposit history section if the page is finished loading and there are deposits. */ }
const showRecentDeposits =
- ! isLoading &&
- deposits?.length > 0 &&
- !! account &&
- ! account?.deposits_blocked;
+ ! isLoading && deposits?.length > 0 && !! account;
// Show a loading state if the page is still loading.
if ( isLoading ) {
@@ -87,7 +89,7 @@ const DepositsOverview: React.FC = () => {
}
// This card isn't shown if there are no deposits, so we can bail early.
- if ( ! isLoading && availableFunds === 0 && deposits.length === 0 ) {
+ if ( ! isLoading && deposits.length === 0 ) {
return null;
}
@@ -98,10 +100,11 @@ const DepositsOverview: React.FC = () => {
{ /* Deposit schedule message */ }
- { isNextDepositExpected && !! account && (
+ { isDepositsUnrestricted && !! account && (
0 }
/>
) }
@@ -112,12 +115,17 @@ const DepositsOverview: React.FC = () => {
) : (
<>
- { isNextDepositExpected && (
-
- ) }
+ { isDepositsUnrestricted &&
+ ! isDepositAwaitingPendingFunds && (
+
+ ) }
{ ! hasCompletedWaitingPeriod && (
) }
+ { hasCompletedWaitingPeriod &&
+ isDepositAwaitingPendingFunds && (
+
+ ) }
{ isNegativeBalanceDepositsPaused && (
) }
diff --git a/client/components/deposits-overview/test/__snapshots__/index.tsx.snap b/client/components/deposits-overview/test/__snapshots__/index.tsx.snap
index 9dcdb85548d..6b4db19d73c 100644
--- a/client/components/deposits-overview/test/__snapshots__/index.tsx.snap
+++ b/client/components/deposits-overview/test/__snapshots__/index.tsx.snap
@@ -17,11 +17,65 @@ exports[`Deposits Overview information Component Renders 1`] = `
>
Deposits
+
+ Available funds are automatically dispatched
+
+ every Monday
+
+ .
+
+ >
+
+
+
+
+
+
+
+ It may take 1-3 business days for deposits to reach your bank account.
+
`;
-exports[`Deposit renders with date available but no deposit 1`] = ``;
-
-exports[`Deposit renders with deposit but no date available 1`] = ``;
+exports[`Deposit renders with date available but no deposit 1`] = `
+
+ Future deposit
+
+
+`;
-exports[`Deposit renders with estimated date and deposit available 1`] = ``;
+exports[`Deposit renders with deposit but no date available 1`] = `
+
+ Future deposit
+
+
+`;
-exports[`Deposit renders with no date or deposit available 1`] = ``;
+exports[`Deposit renders with no date or deposit available 1`] = `
+
+ Future deposit
+
+
+`;
diff --git a/client/transactions/list/test/__snapshots__/index.tsx.snap b/client/transactions/list/test/__snapshots__/index.tsx.snap
index 2f460c0f997..c7bfca77b45 100644
--- a/client/transactions/list/test/__snapshots__/index.tsx.snap
+++ b/client/transactions/list/test/__snapshots__/index.tsx.snap
@@ -248,19 +248,19 @@ exports[`Transactions list renders correctly when can filter by several currenci
- Date / Time
+ Date / Time (UTC)
- Date and time
+ Date and time in UTC
- Sort by Date and time in ascending order
+ Sort by Date and time in UTC in ascending order
- Amount
+ Amount in Deposit Curency
- Sort by Amount in descending order
+ Sort by Amount in Deposit Curency in descending order
@@ -1179,19 +1237,19 @@ exports[`Transactions list renders correctly when filtered by currency 1`] = `
- Date / Time
+ Date / Time (UTC)
- Date and time
+ Date and time in UTC
- Sort by Date and time in ascending order
+ Sort by Date and time in UTC in ascending order
- Amount
+ Amount in Deposit Curency
- Sort by Amount in descending order
+ Sort by Amount in Deposit Curency in descending order
@@ -2107,19 +2223,19 @@ exports[`Transactions list renders correctly when filtered by deposit 1`] = `
- Date / Time
+ Date / Time (UTC)
- Date and time
+ Date and time in UTC
- Sort by Date and time in ascending order
+ Sort by Date and time in UTC in ascending order
- Amount
+ Amount in Deposit Curency
- Sort by Amount in descending order
+ Sort by Amount in Deposit Curency in descending order
- Date / Time
+ Date / Time (UTC)
- Date and time
+ Date and time in UTC
- Sort by Date and time in ascending order
+ Sort by Date and time in UTC in ascending order
- Amount
+ Amount in Deposit Curency
- Sort by Amount in descending order
+ Sort by Amount in Deposit Curency in descending order
@@ -3789,19 +3963,19 @@ exports[`Transactions list when not filtered by deposit renders correctly 1`] =
- Date / Time
+ Date / Time (UTC)
- Date and time
+ Date and time in UTC
- Sort by Date and time in ascending order
+ Sort by Date and time in UTC in ascending order
- Amount
+ Amount in Deposit Curency
- Sort by Amount in descending order
+ Sort by Amount in Deposit Curency in descending order
@@ -4762,19 +4994,19 @@ exports[`Transactions list when not filtered by deposit renders table summary on
- Date / Time
+ Date / Time (UTC)
- Date and time
+ Date and time in UTC
- Sort by Date and time in ascending order
+ Sort by Date and time in UTC in ascending order
- Amount
+ Amount in Deposit Curency
- Sort by Amount in descending order
+ Sort by Amount in Deposit Curency in descending order