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 8.8.0 #10135

Merged
merged 35 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
49b6961
Add TS type assertion for disputes CSV export API response to fix typ…
Jinksi Dec 23, 2024
9637247
Upgrade `@woocommerce/csv-export` to v1.10.0 – fixes unnecessary esca…
Jinksi Dec 23, 2024
952e431
Prevent WooPay opt-in checks from running when WooPayments is not ava…
leonardola Dec 23, 2024
504a42c
Remove unused useEffect import to fix GH linter warning (#10035)
Jinksi Dec 24, 2024
21d5cf8
Add TS type assertion for payout CSV export code for type safety and …
nagpai Dec 24, 2024
889ae36
Consistently format the order notes for refunds and charges (#10036)
deepakpathania Dec 24, 2024
f2c2d52
Merge trunk v8.7.0 into develop
botwoo Dec 25, 2024
442ba90
Update currency conversion method for booking products (#10042)
rafaelzaleski Dec 27, 2024
cd3e288
Reporting: Fix transaction list sort by payout currency (#10041)
nagpai Dec 30, 2024
bacc8ed
Reporting: Overview - improve mobile view of Balances card (#10040)
nagpai Dec 30, 2024
85865e8
Remove payouts rename notice overlay. (#10039)
shendy-a8c Jan 1, 2025
573a5b3
Fix incompatibility with other booking plugins (#10031)
alefesouza Jan 1, 2025
8670a4e
Changed the term "VAT" on Documents Listing Page to "Tax" to be appli…
jessy-p Jan 3, 2025
e4445f9
Add Payment Method to Transactions advanced filters (#10017)
htdat Jan 3, 2025
75b102d
Upgrade spatie/phpunit-watcher to 1.23.6 (#10054)
tpaksu Jan 3, 2025
6846918
Fix ECE exception when payment fails (#10048)
cesarcosta99 Jan 3, 2025
5460f00
Bump stable and tested up to tags (#10078)
tpaksu Jan 6, 2025
bbe2c67
Clean Up Codebase and Remove Obsolete "wallets" Feature Flags and Imp…
gpressutto5 Jan 6, 2025
16c30f6
Checkout: Make sure the font size for PMME is smaller than the labels…
danielmx-dev Jan 7, 2025
0368896
Improve BNPL PMME and icon placement in shortcode checkout (#9993)
gpressutto5 Jan 7, 2025
5098c26
MCCY: Round to lowest denomination before applying price rounding fro…
reykjalin Jan 7, 2025
d7d840b
Revert "Clean Up Codebase and Remove Obsolete "wallets" Feature Flags…
gpressutto5 Jan 8, 2025
01149f2
E2E Playwright Migration: convert Payment Gateways Confirmation spec …
allie500 Jan 8, 2025
ee8a000
refactor: ECE refreshes blocks UI in all scenarios (#10024)
frosso Jan 8, 2025
ec18d58
Update WordPress.org readme.txt file (#10096)
aheckler Jan 9, 2025
c3a7f1b
Convert the Payment Settings Manual Capture spec to Playwright (#10118)
ismaeldcom Jan 9, 2025
f00666f
fix: ECE add-to-cart race condition (#10119)
frosso Jan 9, 2025
700b287
Update PHP and Xdebug in E2E Dockerfile (#10114)
allie500 Jan 9, 2025
82ac1b9
Convert the Shopper Pay for Order spec to Playwright (#10104)
eduardoumpierre Jan 10, 2025
3b79188
Use terms text from the blocks/shortcode page as a fallback (#9887)
leonardola Jan 11, 2025
4e21571
Broaden billing field queries from form-scoped to document-scoped (#1…
timur27 Jan 11, 2025
470bbf7
Update version and add changelog entries for release 8.8.0
github-actions[bot] Jan 12, 2025
33f28a3
Fixes to multiple failing E2E tests (#10057)
alopezari Jan 14, 2025
9368b56
Normalize changelog
ricardo Jan 14, 2025
12e9aad
Merge branch 'trunk' of github.com:Automattic/woocommerce-payments in…
ricardo Jan 14, 2025
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
6 changes: 6 additions & 0 deletions bin/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ cli wp option set woocommerce_currency "USD"
cli wp option set woocommerce_product_type "both"
cli wp option set woocommerce_allow_tracking "no"

echo "Deactivating Coming Soon mode in WooCommerce..."
cli wp option set woocommerce_coming_soon "no"

echo "Enabling company field as an optional parameter in checkout form..."
cli wp option set woocommerce_checkout_company_field "optional"

echo "Importing WooCommerce shop pages..."
cli wp wc --user=admin tool run install_pages

Expand Down
25 changes: 25 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
*** WooPayments Changelog ***

= 8.8.0 - 2025-01-15 =
* Add - Allow transactions filtered by Payment Method.
* Add - Falback terms and conditions for WooPay.
* Fix - Broaden billing field queries from form-scoped to document-scoped.
* Fix - Checkout: Make sure the font size for PMME is smaller than the labels.
* Fix - Ensure consistent formatting of refund notes with MC.
* Fix - Fix incompatibility with some bookings plugins.
* Fix - Fix JS exception when ECE payment fails.
* Fix - Fix transaction list sorting by payout currency.
* Fix - Improve the mobile rendering of the Balances box within Payment Overview.
* Fix - Update currency conversion method for booking products.
* Fix - Update WordPress.org readme.txt file.
* Fix - Upgrade `@woocommerce/csv-export` package to v1.10.0 – fixes unnecessary escaping of negative values in CSV exports that was preventing numerical analysis in spreadsheet applications.
* Fix - Zero dollar subscriptions with zero dollar renewals checkout error.
* Update - Bump stable tag for 8.7.0.
* Update - Improve BNPL PMME and icon placement in shortcode checkout.
* Update - Remove the overlay that announces the rename from deposits to payouts.
* Update - Replaced the term "VAT" with "Tax" in Documents Listing Page.
* Update - round to nearest lowest denominator instead of ceiling before applying currency rounding settings.
* Dev - Add the Playwright Pay for Order spec and remove the equivalent Puppeteer spec.
* Dev - Add type assertion for disputes CSV export response to ensure type safety and fix TypeScript error.
* Dev - Update phpunit-watcher dev package version.
* Dev - Update the PHP version and the Xdebug version used in the E2E testing environment.
* Dev - Update the Playwright Payment Gateways Confirmation spec and remove the Puppeteer Payment Gateways Confirmation spec.

= 8.7.1 - 2025-01-14 =
* Fix - Broaden billing field queries from form-scoped to document-scoped

Expand Down
1 change: 1 addition & 0 deletions client/checkout/api/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const mockAppearance = {
'.Input': {},
'.Input--invalid': {},
'.Label': {},
'.Label--resting': {},
'.Tab': {},
'.Tab--selected': {},
'.Tab:hover': {},
Expand Down
3 changes: 2 additions & 1 deletion client/checkout/blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ Object.entries( enabledPaymentMethodsConfig )
savedTokenComponent: <SavedTokenHandler api={ api } />,
canMakePayment: ( cartData ) => {
const billingCountry = cartData.billingAddress.country;
const needsPayment = cartData.cart.cartNeedsPayment;
const isRestrictedInAnyCountry = !! upeConfig.countries.length;
const isAvailableInTheCountry =
! isRestrictedInAnyCountry ||
upeConfig.countries.includes( billingCountry );
// We used to check if stripe was loaded with `getStripeForUPE`, but we can't guarantee it will be loaded synchronously.
return isAvailableInTheCountry;
return needsPayment && isAvailableInTheCountry;
},
paymentMethodId: upeMethods[ upeName ],
// see .wc-block-checkout__payment-method styles in blocks/style.scss
Expand Down
7 changes: 5 additions & 2 deletions client/checkout/blocks/payment-method-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { useStripeForUPE } from 'wcpay/hooks/use-stripe-async';
import { getUPEConfig } from 'wcpay/utils/checkout';
import { __ } from '@wordpress/i18n';
import './style.scss';
import { useEffect, useState } from '@wordpress/element';
import { getAppearance } from 'wcpay/checkout/upe-styles';
import { useEffect, useMemo, useState } from '@wordpress/element';
import { getAppearance, getFontRulesFromPage } from 'wcpay/checkout/upe-styles';

const bnplMethods = [ 'affirm', 'afterpay_clearpay', 'klarna' ];
const PaymentMethodMessageWrapper = ( {
Expand Down Expand Up @@ -57,6 +57,8 @@ export default ( { api, title, countries, iconLight, iconDark, upeName } ) => {
getUPEConfig( 'wcBlocksUPEAppearanceTheme' )
);

const fontRules = useMemo( () => getFontRulesFromPage(), [] );

// Stripe expects the amount to be sent as the minor unit of 2 digits.
const amount = parseInt(
normalizeCurrencyToMinorUnit(
Expand Down Expand Up @@ -123,6 +125,7 @@ export default ( { api, title, countries, iconLight, iconDark, upeName } ) => {
stripe={ stripe }
options={ {
appearance: appearance,
fonts: fontRules,
} }
>
<PaymentMethodMessagingElement
Expand Down
28 changes: 27 additions & 1 deletion client/checkout/classic/event-handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,39 @@ jQuery( function ( $ ) {
}

if ( targetLabel ) {
// wrapInner target label in a span.woopayments-inner-label if it's not already
let targetLabelInnerSpan = targetLabel.querySelector(
'span.woopayments-inner-label'
);
if ( ! targetLabelInnerSpan ) {
const targetLabelInner = targetLabel.innerHTML;
targetLabel.innerHTML = '';
targetLabelInnerSpan = document.createElement( 'span' );
targetLabelInnerSpan.classList.add(
'woopayments-inner-label'
);
targetLabelInnerSpan.innerHTML = targetLabelInner;
targetLabel.appendChild( targetLabelInnerSpan );
}

let spacer = targetLabel.querySelector( 'span.spacer' );
if ( ! spacer ) {
spacer = document.createElement( 'span' );
spacer.classList.add( 'spacer' );
spacer.innerHTML = '&nbsp;';
targetLabel.insertBefore(
spacer,
targetLabelInnerSpan
);
}

let container = document.getElementById( containerID );
if ( ! container ) {
container = document.createElement( 'span' );
container.id = containerID;
container.dataset.paymentMethodType = method;
container.classList.add( 'stripe-pmme-container' );
targetLabel.appendChild( container );
targetLabelInnerSpan.appendChild( container );
}

const currentCountry =
Expand Down
116 changes: 81 additions & 35 deletions client/checkout/classic/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
position: relative;
}

// Stripe Link button styles.
.wcpay-checkout-email-field button.wcpay-stripelink-modal-trigger {
display: none;
position: absolute;
Expand All @@ -30,66 +31,111 @@
border: none;
}

// Logo styles.
#payment .payment_methods {
li[class*='payment_method_woocommerce_payments'] label img {
float: right;
border: 0;
padding: 0;
height: 24px !important;
max-height: 24px !important;
li[class*='payment_method_woocommerce_payments'] label {
display: inline;
img {
float: right;
border: 0;
padding: 0;
height: 24px !important;
max-height: 24px !important;
}
}
}

li.wc_payment_method:has( .input-radio:not( :checked )
+ label
.stripe-pmme-container ) {
// Payment methods with PMME styles.
li.wc_payment_method:has( label .stripe-pmme-container ) {
display: grid;
grid-template-columns: min-content 1fr;
grid-template-rows: auto auto;
grid-template-columns: max-content 1fr;
grid-template-areas: 'li-input li-label'; // List Item grid.
align-items: baseline;

.input-radio {
grid-row: 1;
grid-column: 1;
grid-area: li-input;
}

label {
grid-column: 2;
grid-row: 1;
}
> label {
grid-area: li-label;

img {
grid-row: 1 / span 2;
align-self: center;
}
display: grid !important;
grid-template-columns: max-content 1fr;
grid-template-areas: 'label-spacer label-inner'; // Label grid.

.stripe-pmme-container {
width: 100%;
grid-column: 1;
grid-row-start: 2;
pointer-events: none;
}
> span.spacer {
grid-area: label-spacer;
}

> .woopayments-inner-label {
grid-area: label-inner;
display: grid;
grid-template-columns: 1fr max-content;
grid-template-areas:
'inner-text inner-logo'
'inner-pmme inner-logo'; // Inner label grid.
align-items: center;

> img {
grid-area: inner-logo;
justify-self: right;
}

.payment_box {
flex: 0 0 100%;
grid-row: 2;
grid-column: 1 / span 2;
> .stripe-pmme-container {
width: 100%;
grid-area: inner-pmme;
pointer-events: none;
}
}
}
}

// Hide the PMMe container when the payment method is checked.
li.wc_payment_method:has( .input-radio:checked
+ label
.stripe-pmme-container ) {
display: block;

.input-radio:checked {
+ label {
.stripe-pmme-container {
display: none;
}
}
}
}

// Pseudo-element radio button compatibility.
// Unfortunately, there is no direct way to detect the existence of pseudo-elements like ::before using CSS selectors,
// so we use the theme class to add the necessary styles.
.theme-storefront,
.theme-twentytwenty,
.theme-twentytwentyone,
.theme-twentytwentytwo,
.theme-twentytwentythree {
#payment {
.payment_methods {
> li.wc_payment_method {
// Storefront does not render the input radio button.
grid-template-areas: 'li-label'; // List Item grid for Storefront.
grid-template-columns: 1fr;

> input + label {
// Storefront uses a label::before for the radio button so we need to adjust the grid.
grid-template-areas: 'label-before label-spacer label-inner'; // Label grid for Storefront.
grid-template-columns: max-content max-content 1fr;
}

> input + label {
&::before {
grid-area: label-before;
}
}
}

img {
grid-column: 2;
// This makes sure labels that don't have the pmme container are displayed correctly.
li[class*='payment_method_woocommerce_payments'] {
> input + label {
display: block;
}
}
}
}
Expand Down
Loading
Loading