Skip to content

Commit

Permalink
Merge release/8.5.0 into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagesh Pai committed Nov 14, 2024
2 parents 738b071 + 3020129 commit 22196f5
Show file tree
Hide file tree
Showing 410 changed files with 6,693 additions and 3,397 deletions.
2 changes: 1 addition & 1 deletion .github/actions/e2e/env-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
uses: actions/cache@v4
with:
path: ./vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}

# Cache node dependencies
- name: Cache node dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-repo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}

- name: "Set up PHP"
uses: ./.github/actions/setup-php
2 changes: 1 addition & 1 deletion .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
# setup PHP, but without debug extensions for reasonable performance
- name: "Set up PHP"
uses: ./.github/actions/setup-php
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
# setup PHP, but without debug extensions for reasonable performance
- uses: shivammathur/setup-php@v2
with:
Expand All @@ -54,7 +54,7 @@ jobs:
coverage: none
# run CI checks
- run: bash bin/run-ci-tests.bash

generate-wc-compat-beta-matrix:
name: "Generate the matrix for compatibility-woocommerce-beta dynamically"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
# setup PHP, but without debug extensions for reasonable performance
- uses: shivammathur/setup-php@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
# setup PHP, but without debug extensions for reasonable performance
- uses: shivammathur/setup-php@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/i18n-weekly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
- uses: actions/cache@v4
with:
path: ~/.npm/
Expand All @@ -33,7 +33,7 @@ jobs:
run: |
npm ci
npm run build
if [[ ! -f woocommerce-payments.zip ]]; then
echo "Failed to create release zip"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
- uses: actions/cache@v4
with:
path: ~/.npm/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/php-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
# setup PHP, but without debug extensions for reasonable performance
- name: "Set up PHP"
uses: ./.github/actions/setup-php
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand Down
84 changes: 83 additions & 1 deletion assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,93 @@
padding-top: 2px;
}

/* WCPay Fraud Risk Level meta box */
.wcpay-fraud-risk-level {
border-bottom: 1px solid #ddd;
padding: 8px 12px;
}

.wcpay-fraud-risk-level > p {
margin: 0;
}

.wcpay-fraud-risk-level__title {
font-weight: 600;
}

.wcpay-fraud-risk-level__bar {
display: grid;
gap: 4px;
grid-template-columns: 50% auto;
margin: 6px 0 8px;
}

.wcpay-fraud-risk-level__bar::after,
.wcpay-fraud-risk-level__bar::before {
background-color: #bbb;
content: '';
border-radius: 4px;
height: 4px;
}

.wcpay-fraud-risk-level--normal .wcpay-fraud-risk-level__title {
color: #008a20;
}

.wcpay-fraud-risk-level--normal .wcpay-fraud-risk-level__bar {
grid-template-columns: 15% auto;
}

.wcpay-fraud-risk-level--normal .wcpay-fraud-risk-level__bar::before {
background-color: #008a20;
}

.wcpay-fraud-risk-level--elevated .wcpay-fraud-risk-level__title {
color: #b16202;
}

.wcpay-fraud-risk-level--elevated .wcpay-fraud-risk-level__bar {
grid-template-columns: 60% auto;
}

.wcpay-fraud-risk-level--elevated .wcpay-fraud-risk-level__bar::before {
background-color: #b16202;
}

.wcpay-fraud-risk-level--highest .wcpay-fraud-risk-level__bar::before {
background-color: #b32d2e;
}

.wcpay-fraud-risk-level--highest .wcpay-fraud-risk-level__bar {
grid-template-columns: 100% auto;
}

.wcpay-fraud-risk-level--highest .wcpay-fraud-risk-level__bar::before {
background-color: #b32d2e;
}

/* WCPay Fraud Risk Action meta box */
#wcpay-order-fraud-and-risk-meta-box div.inside {
margin-top: 0;
padding: 0;
}

.wcpay-fraud-risk-action {
padding: 8px 12px 12px;
}

.wcpay-fraud-risk-action > p {
margin: 0 0 6px;
}

.wcpay-fraud-risk-action > p:last-child {
margin-bottom: 0;
}

.wcpay-fraud-risk-meta-allow,
.wcpay-fraud-risk-meta-review,
.wcpay-fraud-risk-meta-blocked {
font-weight: 600;
font-size: 14px;
}

.wcpay-fraud-risk-meta-allow img {
Expand Down
6 changes: 3 additions & 3 deletions assets/css/success.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
align-items: center;
flex-wrap: wrap;
line-height: 1;
padding-top: 4px;
}

.wc-payment-gateway-method-logo-wrapper img {
margin-right: 0.5rem;
padding-top: 4px;
}

.wc-payment-gateway-method-logo-wrapper.wc-payment-bnpl-logo img {
max-height: 30px;
.wc-payment-gateway-method-logo-wrapper.wc-payment-lpm-logo img {
max-height: 26px;
}
6 changes: 3 additions & 3 deletions assets/css/success.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
align-items: center;
flex-wrap: wrap;
line-height: 1;
padding-top: 4px;
}

.wc-payment-gateway-method-logo-wrapper img {
margin-left: 0.5rem;
padding-top: 4px;
}

.wc-payment-gateway-method-logo-wrapper.wc-payment-bnpl-logo img {
max-height: 30px;
.wc-payment-gateway-method-logo-wrapper.wc-payment-lpm-logo img {
max-height: 26px;
}
34 changes: 34 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
*** WooPayments Changelog ***

= 8.5.0 - 2024-11-13 =
* Add - Add country-specific test card numbers for credit card testing
* Add - Add risk level information to the fraud and risk box on the order details page.
* Add - Add support for allowedShippingCountries in Express Checkout Element.
* Fix - Avoid PHP warnings for requests with an empty path.
* Fix - BNPL methods now work properly in Pay for Order when they are available. Default values are also provided when available.
* Fix - fix: payment method icon alt text
* Fix - Fix compatibility issues with CustomSelectControl component styles for WordPress 6.7
* Fix - Fix duplicate saving of 3DS card entry after checkout
* Fix - Fixed single product page view tracks when BNPL and PRB payment methods are inactive.
* Fix - Fix PMME appearance in checkout
* Fix - Fix settings display on the advanced fraud protection page.
* Fix - Fix WooPay button preview in plugin settings.
* Fix - Fix WooPay duplicated Save my info section.
* Fix - Include missing scripts that handle refunds for non credit card payments in the order details page.
* Fix - Introducing consistency in colors for deposits across pages
* Fix - Prevent dead space on product pages when no BNPL offers are available.
* Fix - Provide backwards-compatible method for retrieving the multi-currency instance.
* Fix - Register Expresss Checkout block only when enabled in the settings
* Fix - Remove unnecessary '.woocommerce-table' css overrides to fix WC Analytics styling and a11y issues
* Fix - Use 'Withdrawal' and 'Deducted' labels when referring to withdrawal deposits, to more accurately communicate the type of transaction that has occurred
* Update - Add in-memory cache fallback for our database-cached objects in case of database write failures.
* Update - Decoupled Multi-currency module from gateway dependencies.
* Update - Improvements to events during onboarding flow.
* Update - Refactor loadStripe for Express Checkouts.
* Update - Rename 'deposit' to 'payout' across various places in the WooPayments admin UI, docs and doc URLs.
* Update - update: payment method "test mode" label at checkout to be displayed only when payment method is selected
* Update - update: show LPM payment method icon on order success page
* Update - Use preview versions of the actual ECE buttons in the Block editor.
* Update - When tracking is enabled, send a tracks event when the merchant is redirected to a Stripe Capital offer.
* Dev - Add Jest tests for the disputed order notices
* Dev - Add unit tests for the Capital Loans page component.
* Dev - Bump WC tested up to version to 9.4.0

= 8.4.0 - 2024-10-23 =
* Add - Add test mode badge to classic checkout and add payment method.
* Add - Using Floating Labels with Stripe Appearance API for Blocks Checkout
Expand Down
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 'wcpay/multi-currency/missing-currencies-message';
import { getMissingCurrenciesTooltipMessage } from 'multi-currency/interface/functions';
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 '../../data';
} from 'multi-currency/interface/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,25 +22,31 @@ 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,18 +7,21 @@ import { render, screen } from '@testing-library/react';
/**
* Internal dependencies
*/
import { useAccountDomesticCurrency } from '../../../data';
import {
useCurrencies,
useEnabledCurrencies,
useAccountDomesticCurrency,
} from 'wcpay/data';
} from 'multi-currency/interface/data';
import CurrencyInformationForMethods from '../currency-information-for-methods';
import WCPaySettingsContext from '../../../settings/wcpay-settings-context';

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

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

jest.mock( '@wordpress/a11y', () => ( {
Expand Down
16 changes: 16 additions & 0 deletions client/additional-methods-setup/wizard/task-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@
}
}

&__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
Loading

0 comments on commit 22196f5

Please sign in to comment.