Skip to content

Commit

Permalink
Merge branch 'develop' into blocks-checkout-label-design
Browse files Browse the repository at this point in the history
  • Loading branch information
gpressutto5 authored Sep 24, 2024
2 parents 2673bfa + 7cd304e commit 91ebb85
Show file tree
Hide file tree
Showing 287 changed files with 2,340 additions and 2,551 deletions.
13 changes: 13 additions & 0 deletions assets/images/woo-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** WooPayments Changelog ***

= 8.2.2 - 2024-09-24 =
* Fix - Fix WooPay pre-checking place order bug when buying a subscription.

= 8.2.1 - 2024-09-13 =
* Fix - Create div container element with JS dynamically.

Expand Down
4 changes: 4 additions & 0 deletions changelog/9363-manual-capture-disable-payment-methods
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Update payment methods when manual capture is enabled.
4 changes: 4 additions & 0 deletions changelog/add-8522-utc-list-page-csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: add

Add UTC to the date time column header of transactions list page.
4 changes: 4 additions & 0 deletions changelog/add-9245-ece-locale
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: add

Provide locale to Express Checkout Element.
4 changes: 4 additions & 0 deletions changelog/dev-fix-po-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Fix progressive onboarding e2e test
4 changes: 4 additions & 0 deletions changelog/dev-i4-design-updates
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Some minor styling updates on the Onboarding form.
4 changes: 4 additions & 0 deletions changelog/dev-remove-feature-flag
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Remove feature flag to make embedded KYC enabled by default
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Not user-facing: migrate dispute response flow e2e tests to playwright


4 changes: 4 additions & 0 deletions changelog/fix-9332-default-express-buttons-only-icon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Default express checkout button label to "Only icon".
4 changes: 4 additions & 0 deletions changelog/fix-9390-hide-bnpl-pmme-if-gateway-is-disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Do not display BNPL methods and PMME when WooPayments is disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Allow the network saved card payment method setting to be overridden by the `wcpay_force_network_saved_cards` filter
4 changes: 4 additions & 0 deletions changelog/fix-update-dark-blueberry-color
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Fix gutenberg blueberry focus color
4 changes: 4 additions & 0 deletions changelog/fix-woopay-pre-checking-save-my-info-place-order
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fix WooPay pre-checking place order bug when buying a subscription.
4 changes: 0 additions & 4 deletions changelog/multi-currency-v2

This file was deleted.

5 changes: 5 additions & 0 deletions changelog/revert-9439-multi-currency-v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Revert "Decoupled Multi-currency module from gateway dependencies."


4 changes: 4 additions & 0 deletions changelog/update-9305-settings-disable-save-changes-button
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: add

Disable save changes button until a setting has changed.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import PaymentMethodCheckbox from '../../components/payment-methods-checkboxes/p
import { LoadableBlock } from '../../components/loadable';
import LoadableSettingsSection from '../../settings/loadable-settings-section';
import CurrencyInformationForMethods from './currency-information-for-methods';
import { getMissingCurrenciesTooltipMessage } from 'multi-currency/interface/functions';
import { getMissingCurrenciesTooltipMessage } from 'wcpay/multi-currency/missing-currencies-message';
import { upeCapabilityStatuses, upeMethods } from '../constants';
import paymentMethodsMap from '../../payment-methods-map';
import ConfirmPaymentMethodActivationModal from 'wcpay/settings/payment-methods-list/activation-modal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import interpolateComponents from '@automattic/interpolate-components';
/**
* Internal dependencies
*/
import { useAccountDomesticCurrency } from '../../data';
import {
useAccountDomesticCurrency,
useCurrencies,
useEnabledCurrencies,
} from 'multi-currency/interface/data';
} from '../../data';
import WCPaySettingsContext from '../../settings/wcpay-settings-context';
import InlineNotice from 'components/inline-notice';
import PaymentMethodsMap from '../../payment-methods-map';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,25 @@ import {
useEnabledPaymentMethodIds,
useGetPaymentMethodStatuses,
useSettings,
useCurrencies,
useEnabledCurrencies,
useManualCapture,
useAccountDomesticCurrency,
} from '../../../data';
import {
useCurrencies,
useEnabledCurrencies,
} from 'multi-currency/interface/data';

import WCPaySettingsContext from '../../../settings/wcpay-settings-context';
import { upeCapabilityStatuses } from 'wcpay/additional-methods-setup/constants';

jest.mock( '../../../data', () => ( {
useGetAvailablePaymentMethodIds: jest.fn(),
useEnabledPaymentMethodIds: jest.fn(),
useSettings: jest.fn(),
useCurrencies: jest.fn(),
useEnabledCurrencies: jest.fn(),
useGetPaymentMethodStatuses: jest.fn(),
useManualCapture: jest.fn(),
useAccountDomesticCurrency: jest.fn(),
} ) );

jest.mock( 'multi-currency/interface/data', () => ( {
useCurrencies: jest.fn(),
useEnabledCurrencies: jest.fn(),
} ) );

jest.mock( '@wordpress/a11y', () => ( {
...jest.requireActual( '@wordpress/a11y' ),
speak: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@ import { render, screen } from '@testing-library/react';
/**
* Internal dependencies
*/
import { useAccountDomesticCurrency } from '../../../data';
import {
useCurrencies,
useEnabledCurrencies,
} from 'multi-currency/interface/data';
useAccountDomesticCurrency,
} from 'wcpay/data';
import CurrencyInformationForMethods from '../currency-information-for-methods';
import WCPaySettingsContext from '../../../settings/wcpay-settings-context';

jest.mock( '../../../data', () => ( {
useAccountDomesticCurrency: jest.fn(),
} ) );

jest.mock( 'multi-currency/interface/data', () => ( {
jest.mock( 'wcpay/data', () => ( {
useCurrencies: jest.fn(),
useEnabledCurrencies: jest.fn(),
useAccountDomesticCurrency: jest.fn(),
} ) );

jest.mock( '@wordpress/a11y', () => ( {
Expand Down
18 changes: 1 addition & 17 deletions client/additional-methods-setup/wizard/task-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ import { Icon, check } from '@wordpress/icons';
import WizardTaskContext from './task/context';
import './task-item.scss';

const WizardTaskItem = ( {
children,
title,
index,
className,
visibleDescription,
} ) => {
const WizardTaskItem = ( { children, title, index, className } ) => {
const { isCompleted, isActive } = useContext( WizardTaskContext );

return (
Expand Down Expand Up @@ -45,16 +39,6 @@ const WizardTaskItem = ( {
</div>
<span className="wcpay-wizard-task__title">{ title }</span>
</div>
{ visibleDescription && ! isActive && (
<span
className={ classNames(
'wcpay-wizard-task__visible-description-element',
'is-muted-color'
) }
>
{ visibleDescription }
</span>
) }
<div className="wcpay-wizard-task__body">{ children }</div>
</li>
);
Expand Down
16 changes: 0 additions & 16 deletions client/additional-methods-setup/wizard/task-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,6 @@
}
}

&__visible-description-element {
position: absolute;
margin-left: 40px;
margin-top: 0;
margin-bottom: 1em;

&.is-muted-color {
color: $gray-700;
}

.components-external-link svg {
width: 1em;
height: 1em;
}
}

.add-payment-methods-task {
&__payment-selector {
&-wrapper {
Expand Down
5 changes: 1 addition & 4 deletions client/capital/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ import Page from 'components/page';
import { TestModeNotice } from 'components/test-mode-notice';
import ErrorBoundary from 'components/error-boundary';
import ActiveLoanSummary from 'components/active-loan-summary';
import {
formatExplicitCurrency,
isZeroDecimalCurrency,
} from 'multi-currency/interface/functions';
import { formatExplicitCurrency, isZeroDecimalCurrency } from 'utils/currency';
import { CapitalLoan } from 'data/capital/types';
import ClickableCell from 'components/clickable-cell';
import Chip from 'components/chip';
Expand Down
2 changes: 1 addition & 1 deletion client/checkout/woopay/email-input-iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import { buildAjaxURL } from 'utils/express-checkout';
import { getAppearance } from 'checkout/upe-styles';
import {
getTargetElement,
getAppearanceType,
validateEmail,
appendRedirectionParams,
shouldSkipWooPay,
deleteSkipWooPayCookie,
} from './utils';
import { getAppearanceType } from '../utils';

export const handleWooPayEmailInput = async (
field,
Expand Down
2 changes: 1 addition & 1 deletion client/components/account-balances/balance-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as React from 'react';
/**
* Internal dependencies
*/
import { formatCurrency } from 'multi-currency/interface/functions';
import { formatCurrency } from 'wcpay/utils/currency';
import Loadable from 'components/loadable';

/**
Expand Down
2 changes: 1 addition & 1 deletion client/components/account-balances/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from './balance-tooltip';
import { fundLabelStrings } from './strings';
import { ClickTooltip } from '../tooltip';
import { formatCurrency } from 'multi-currency/interface/functions';
import { formatCurrency } from 'wcpay/utils/currency';
import { useAllDepositsOverviews } from 'wcpay/data';
import { useSelectedCurrency } from 'wcpay/overview/hooks';
import './style.scss';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Internal dependencies
*/
import ProgressBar from 'components/progress-bar';
import { formatCurrency } from 'multi-currency/interface/functions';
import { formatCurrency } from 'utils/currency';

const ExpirationBar = ( {
feeData: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import moment from 'moment';
/**
* Internal dependencies
*/
import { formatCurrency } from 'multi-currency/interface/functions';
import { formatCurrency } from 'utils/currency';

const ExpirationDescription = ( {
feeData: { volume_allowance: volumeAllowance, end_time: endTime, ...rest },
Expand Down
5 changes: 1 addition & 4 deletions client/components/account-status/account-fees/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import { __ } from '@wordpress/i18n';
*/
import ExpirationBar from './expiration-bar';
import ExpirationDescription from './expiration-description';
import {
formatCurrencyName,
getCurrency,
} from 'multi-currency/interface/functions';
import { formatCurrencyName, getCurrency } from 'utils/currency';
import {
formatAccountFeesDescription,
getCurrentBaseFee,
Expand Down
2 changes: 1 addition & 1 deletion client/components/active-loan-summary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { dateI18n } from '@wordpress/date';
/**
* Internal dependencies.
*/
import { formatExplicitCurrency } from 'multi-currency/interface/functions';
import { formatExplicitCurrency } from 'utils/currency';
import Loadable from 'components/loadable';
import { useActiveLoanSummary } from 'wcpay/data';
import { getAdminUrl } from 'wcpay/utils';
Expand Down
1 change: 1 addition & 0 deletions client/components/csv-export-modal/test/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe( 'RefundModal', () => {

mockUseSettings.mockReturnValue( {
isLoading: false,
isDirty: false,
isSaving: false,
saveSettings: ( a ) => a,
} );
Expand Down
2 changes: 1 addition & 1 deletion client/components/deposits-overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { getHistory } from '@woocommerce/navigation';
* Internal dependencies.
*/
import { getAdminUrl } from 'wcpay/utils';
import { formatExplicitCurrency } from 'multi-currency/interface/functions';
import { formatExplicitCurrency } from 'wcpay/utils/currency';
import { recordEvent } from 'tracks';
import Loadable from 'components/loadable';
import { useSelectedCurrencyOverview } from 'wcpay/overview/hooks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import './style.scss';
import DepositStatusChip from 'components/deposit-status-chip';
import { getDepositDate } from 'deposits/utils';
import { CachedDeposit } from 'wcpay/types/deposits';
import { formatCurrency } from 'multi-currency/interface/functions';
import { formatCurrency } from 'wcpay/utils/currency';
import { getDetailsURL } from 'wcpay/components/details-link';

interface RecentDepositsProps {
Expand Down
2 changes: 1 addition & 1 deletion client/components/disputed-order-notice/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { createInterpolateElement } from '@wordpress/element';
* Internal dependencies
*/
import InlineNotice from 'wcpay/components/inline-notice';
import { formatExplicitCurrency } from 'multi-currency/interface/functions';
import { formatExplicitCurrency } from 'utils/currency';
import { reasons } from 'wcpay/disputes/strings';
import { getDetailsURL } from 'wcpay/components/details-link';
import {
Expand Down
2 changes: 1 addition & 1 deletion client/components/payment-activity/payment-data-tile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { recordEvent } from 'wcpay/tracks';
/**
* Internal dependencies
*/
import { formatCurrency } from 'multi-currency/interface/functions';
import { formatCurrency } from 'wcpay/utils/currency';
import Loadable from '../loadable';
import './style.scss';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion client/components/welcome/currency-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { decodeEntities } from '@wordpress/html-entities';
* Internal dependencies
*/
import { useSelectedCurrency } from 'overview/hooks';
import { getCurrency } from 'multi-currency/interface/functions';
import { getCurrency } from 'utils/currency';
import InlineLabelSelect from '../inline-label-select';
import { recordEvent } from 'tracks';

Expand Down
Loading

0 comments on commit 91ebb85

Please sign in to comment.