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.9.0 #7823

Merged
merged 63 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
a19f2b0
Do not show the WooPay button on the product page when WC Bookings re…
hsingyuc Nov 13, 2023
00917e5
Fix saved card payment error on blocks checkout (#7701)
tpaksu Nov 14, 2023
97dd26c
E2E tests for checking out with Giropay (#7650)
anu-rock Nov 14, 2023
c444807
Update to not hardcode country/address on builder flow account creati…
dmallory42 Nov 14, 2023
1f9e6f3
Handle minimum amount error in InitialState (project RPP). (#7608)
htdat Nov 14, 2023
2c4a9b6
Add AutomateWoo - Refer A Friend Add-On support on WooPay (#7300)
alefesouza Nov 14, 2023
7b92882
Add client's user agent to Tracks props (#7644)
malithsen Nov 14, 2023
f630665
Add invalid prodcut id error check (#7666)
hsingyuc Nov 14, 2023
4233d9c
Introduce `wcpay_payment_request_is_cart_supported` filter. (#7439)
peterwilsoncc Nov 15, 2023
61b72e7
Silence QIT semgrep false positives (#7719)
vladolaru Nov 15, 2023
ed5db4a
Adds a new option which reflects the modal being dismissed. (#7693)
dmallory42 Nov 15, 2023
22656a5
chore: change PRB default height (#7712)
frosso Nov 15, 2023
72e4fb3
Revert "feat: add UPE appearance filter (#7578)" (#7722)
frosso Nov 15, 2023
acc531f
Changes to Payment Process to store the working mode of the gateway (…
jessy-p Nov 15, 2023
2a1fef5
Add customer details flow to inital state (#7640)
zmaglica Nov 15, 2023
ec6ffa5
Fix old subs links (#7469)
aheckler Nov 15, 2023
8a48349
Remove "Estimated" option from the deposit list advanced filters (#7632)
Jinksi Nov 15, 2023
8228513
Exclude estimated deposits from useDeposits data hook by default (#7688)
Jinksi Nov 15, 2023
1374d1e
Remove estimated deposits from transaction list and details page (#7670)
brucealdridge Nov 15, 2023
8e36998
Update Payments Overview deposits UI to simplify how we communicate u…
Jinksi Nov 16, 2023
be1b142
Remove unsupported EUR currency from Afterpay payment method (#7723)
mgascam Nov 16, 2023
9e27d8b
Show Payments menu sub-items only for merchants that completed KYC (#…
oaratovskyi Nov 16, 2023
90177ab
Merge trunk v6.8.0 into develop
botwoo Nov 16, 2023
505ebf6
Enable deferred intent creation when initialization process encounter…
timur27 Nov 17, 2023
4857383
Fix setting options on non-production environments (#7483)
allie500 Nov 17, 2023
06730ad
Add channel, country and risk level filters
mordeth Nov 20, 2023
1db31c8
Merge branch 'add/7596-transactions-filters' into develop
mordeth Nov 20, 2023
3b4fd4b
Revert "Merge branch 'add/7596-transactions-filters' into develop" (#…
mordeth Nov 20, 2023
eafb379
Support "variation" products on ajax_add_to_cart for Google/Apple Pay…
ecairol Nov 20, 2023
04f42ea
E2E tests for Affirm and Afterpay checkout (#7453)
mgascam Nov 20, 2023
7496344
chore: WooPay button translation improvment (#7759)
frosso Nov 21, 2023
0045b60
RPP: Handle fraud prevention service in InitialState (#7696)
htdat Nov 22, 2023
b699f1b
RPP: Handle failed transaction rate limiter (#7672)
htdat Nov 22, 2023
5caa5ba
Reinitialise the Express Payment buttons if the customer previously a…
james-allan Nov 22, 2023
4c06a75
Clean up after order is completed processing (#7737)
jessy-p Nov 22, 2023
7fbc126
Transaction detail render customer with falling back to order details…
kalessil Nov 22, 2023
7555461
Pass the pay-for-order params to the first-party auth flow (#7763)
hsingyuc Nov 22, 2023
e26044d
Add date_between filter for Authorization Reporting API (#7707)
dpaun1985 Nov 23, 2023
818fe82
Buyer details reference: handle empty billing name. (#7772)
kalessil Nov 23, 2023
2af85e4
Prevent merchants to access onboarding again after starting it in new…
oaratovskyi Nov 23, 2023
81c4e3e
Allow requests with IDs to be extended (#7775)
RadoslavGeorgiev Nov 24, 2023
529f9f7
Enable the new onboarding flow as default for all users (#7773)
oaratovskyi Nov 24, 2023
58a061d
Display notice when clicking the WooPay button if variable product se…
ricardo Nov 24, 2023
30019b5
Sanitize the Tracks properties (#7755)
malithsen Nov 25, 2023
b552162
Allow PO accounts to continue the first part of onboarding (#7716)
daquinons Nov 27, 2023
10854dc
Streamline UPE & non-UPE branching across the codebase & improve test…
timur27 Nov 27, 2023
09f8ca1
Fix pay for order flow missing user session email (#7709)
hsingyuc Nov 27, 2023
69e5244
Upgrade the csv-export JS package to the latest version (#7729)
anu-rock Nov 28, 2023
fa84c9e
Deposit details - for instant deposits, replace the transaction list …
Jinksi Nov 29, 2023
0cc48d5
Use supported countries instead of business types for PO (#7798)
ismaeldcom Nov 29, 2023
c0a286f
Fix WooPay button location Tracks (#7765)
malithsen Nov 29, 2023
755c263
Improve Dev Mode Indicators (#7768)
dmallory42 Nov 29, 2023
00df31e
Code quality improvements for the Deposit Details component (#7786)
Jinksi Nov 30, 2023
77560f3
Update to handle redirect to new onboarding from WCAdmin Promo (#7812)
dmallory42 Nov 30, 2023
181b3e1
Bump WC tested up to version to 8.3.1 (#7807)
ricardo Nov 30, 2023
7849b43
Add filter to disable WooPay checkout auto-redirect and email OTP ifr…
ricardo Nov 30, 2023
2aef1c6
Add E2E tests for shopper multi-currency checkout (#7804)
rafaelzaleski Nov 30, 2023
ea01d12
Update dispute winning e2e test to look for other text that does not …
shendy-a8c Dec 1, 2023
4b395bc
Add connect page non supported country banner (#7811)
ismaeldcom Dec 1, 2023
28dbda8
Update settings redirection to handle every case (#7820)
ismaeldcom Dec 1, 2023
3ff9210
Introduce filters for channel, customer country, and risk level on th…
mordeth Dec 1, 2023
fc9c813
Update version and add changelog entries for release 6.9.0
github-actions[bot] Dec 3, 2023
9bac0aa
Make changelog entries more consistent with full stop
ricardo Dec 6, 2023
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
49 changes: 49 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
*** WooPayments Changelog ***

= 6.9.0 - 2023-12-06 =
* Add - Added cleanup code after Payment Processing - RPP.
* Add - Adds new option to track dismissal of PO eligibility modal.
* Add - Display an error banner on the connect page when the WooCommerce country is not supported.
* Add - Filter to disable WooPay checkout auto-redirect and email input hooks.
* Add - Handle failed transaction rate limiter in RPP.
* Add - Handle fraud prevention service in InitialState (project RPP).
* Add - Handle mimium amount in InitialState (project RPP).
* Add - Introduce filters for channel, customer country, and risk level on the transactions list page.
* Add - Store the working mode of the gateway (RPP).
* Fix - Add AutomateWoo - Refer A Friend Add-On support on WooPay.
* Fix - Add date_between filter for Authorization Reporting API.
* Fix - Add invalid product id error check.
* Fix - Allow Gradual signup accounts to continue with the Gradual KYC after abandoning it.
* Fix - Allow requests with item IDs to be extended without exceptions.
* Fix - Check that the email is set in the post global.
* Fix - Display notice when clicking the WooPay button if variable product selection is incomplete.
* Fix - Do not show the WooPay button on the product page when WC Bookings require confirmation.
* Fix - Enable deferred intent creation when initialization process encounters cache unavailability.
* Fix - Ensure express payment methods (Google and Apple Pay) correctly reflect eligible shipping methods after closing and reattempting payment.
* Fix - Fixes a redirect to show the new onboarding when coming from WC Core.
* Fix - Fix saved card payments not working on block checkout while card testing prevention is active.
* Fix - Pass the pay-for-order params to the first-party auth flow.
* Fix - Prevent merchants to access onboarding again after starting it in new flow.
* Fix - Remove unsupported EUR currency from Afterpay payment method.
* Fix - Show Payments menu sub-items only for merchants that completed KYC.
* Fix - Support 'variation' product type when re-adding items to a cart.
* Fix - When rendering customer reference in transaction details, fallback to order data.
* Fix - When rendering customer reference on transaction details page, handle case with name being not provided in the order.
* Update - Change PRB default height for new installations.
* Update - Cleanup the deprecated payment gateway processing - part I.
* Update - Correct some links that now lead to better documentation.
* Update - Enable the new onboarding flow as default for all users.
* Update - Exclude estimated deposits from the deposits list screen.
* Update - Improvements to the dev mode and test mode indicators.
* Update - Remove estimated status option from the advanced filters on the deposits list screen.
* Update - Replace the deposit overview transactions list with a "transaction history is unavailable for instant deposits" message.
* Update - Update Payments Overview deposits UI to simplify how we communicate upcoming deposits.
* Update - Update to the new onboarding builder flow to not prefill country/address to US.
* Dev - Add client user-agent value to Tracks event props.
* Dev - Add E2E tests for Affirm and Afterpay checkouts.
* Dev - Add E2E tests for checking out with Giropay.
* Dev - Added customer details management within the re-engineered payment process.
* Dev - Adds WCPay options to Woo Core option allow list to avoid 403 responses from Options API when getting and updating options in non-prod env.
* Dev - Bump WC tested up to version to 8.3.1.
* Dev - Fix a bug in WooPay button update Tracks.
* Dev - Introduce filter `wcpay_payment_request_is_cart_supported`. Allow plugins to conditionally disable payment request buttons on cart and checkout pages containing products that do not support them.
* Dev - Upgrade the csv-export JS package to the latest version.

= 6.8.0 - 2023-11-16 =
* Add - Added mechanism to track and log changes to the payment context (reengineering payment process)
* Add - Add rejected payment method capability status
Expand Down
6 changes: 3 additions & 3 deletions client/capital/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { dateI18n } from '@wordpress/date';
* Internal dependencies.
*/
import Page from 'components/page';
import { TestModeNotice, topics } from 'components/test-mode-notice';
import { TestModeNotice } from 'components/test-mode-notice';
import ErrorBoundary from 'components/error-boundary';
import ActiveLoanSummary from 'components/active-loan-summary';
import { formatExplicitCurrency, isZeroDecimalCurrency } from 'utils/currency';
Expand All @@ -21,7 +21,6 @@ import ClickableCell from 'components/clickable-cell';
import Chip from 'components/chip';
import { useLoans } from 'wcpay/data';
import { getAdminUrl } from 'wcpay/utils';

import './style.scss';

const columns = [
Expand Down Expand Up @@ -205,7 +204,8 @@ const CapitalPage = (): JSX.Element => {

return (
<Page>
<TestModeNotice topic={ topics.loans } />
<TestModeNotice currentPage="loans" />

{ wcpaySettings.accountLoans.has_active_loan && (
<ErrorBoundary>
<ActiveLoanSummary />
Expand Down
4 changes: 2 additions & 2 deletions client/checkout/blocks/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const WCPayFields = ( {
stripe,
elements,
billing: { billingData },
eventRegistration: { onPaymentProcessing, onCheckoutSuccess },
eventRegistration: { onPaymentSetup, onCheckoutSuccess },
emitResponse,
shouldSavePayment,
} ) => {
Expand All @@ -49,7 +49,7 @@ const WCPayFields = ( {
// When it's time to process the payment, generate a Stripe payment method object.
useEffect(
() =>
onPaymentProcessing( () => {
onPaymentSetup( () => {
if ( PAYMENT_METHOD_NAME_CARD !== activePaymentMethod ) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion client/checkout/blocks/generate-payment-method.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { PAYMENT_METHOD_NAME_CARD } from '../constants.js';
* @param {Object} billingData The billing data, which was collected from the checkout block.
* @param {string} fingerprint User fingerprint.
*
* @return {Object} The `onPaymentProcessing` response object, including a type and meta data/error message.
* @return {Object} The `onPaymentSetup` response object, including a type and meta data/error message.
*/
const generatePaymentMethod = async (
api,
Expand Down
1 change: 1 addition & 0 deletions client/checkout/blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ registerPaymentMethod( {
if ( getConfig( 'isWooPayEnabled' ) ) {
if (
document.querySelector( '[data-block-name="woocommerce/checkout"]' ) &&
getConfig( 'isWooPayEmailInputEnabled' ) &&
! isPreviewing()
) {
handleWooPayEmailInput( '#email', api, true );
Expand Down
28 changes: 27 additions & 1 deletion client/checkout/blocks/saved-token-handler.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
/**
* Internal dependencies
*/
import { useEffect } from 'react';
import { usePaymentCompleteHandler } from './hooks';
import { useSelect } from '@wordpress/data';

export const SavedTokenHandler = ( {
api,
stripe,
elements,
eventRegistration: { onCheckoutSuccess },
eventRegistration: { onPaymentSetup, onCheckoutSuccess },
emitResponse,
} ) => {
const paymentMethodData = useSelect( ( select ) => {
const store = select( 'wc/store/payment' );
return store.getPaymentMethodData();
} );

useEffect( () => {
return onPaymentSetup( () => {
const fraudPreventionToken = document
.querySelector( '#wcpay-fraud-prevention-token' )
?.getAttribute( 'value' );

return {
type: 'success',
meta: {
paymentMethodData: {
...paymentMethodData,
'wcpay-fraud-prevention-token':
fraudPreventionToken ?? '',
},
},
};
} );
}, [ onPaymentSetup, paymentMethodData ] );

// Once the server has completed payment processing, confirm the intent of necessary.
usePaymentCompleteHandler(
api,
Expand Down
4 changes: 2 additions & 2 deletions client/checkout/blocks/upe-fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const WCPayUPEFields = ( {
activePaymentMethod,
billing: { billingData },
shippingData,
eventRegistration: { onPaymentProcessing, onCheckoutSuccess },
eventRegistration: { onPaymentSetup, onCheckoutSuccess },
emitResponse,
paymentIntentId,
paymentIntentSecret,
Expand Down Expand Up @@ -135,7 +135,7 @@ const WCPayUPEFields = ( {
// When it's time to process the payment, generate a Stripe payment method object.
useEffect(
() =>
onPaymentProcessing( () => {
onPaymentSetup( () => {
if ( PAYMENT_METHOD_NAME_CARD !== activePaymentMethod ) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions client/checkout/blocks/upe-split-fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const WCPayUPEFields = ( {
testingInstructions,
billing: { billingData },
shippingData,
eventRegistration: { onPaymentProcessing, onCheckoutSuccess },
eventRegistration: { onPaymentSetup, onCheckoutSuccess },
emitResponse,
paymentMethodId,
upeMethods,
Expand Down Expand Up @@ -133,7 +133,7 @@ const WCPayUPEFields = ( {
// When it's time to process the payment, generate a Stripe payment method object.
useEffect(
() =>
onPaymentProcessing( () => {
onPaymentSetup( () => {
if ( upeMethods[ paymentMethodId ] !== activePaymentMethod ) {
return;
}
Expand Down
6 changes: 5 additions & 1 deletion client/checkout/classic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,11 @@ jQuery( function ( $ ) {
}
} );

if ( getConfig( 'isWooPayEnabled' ) && ! isPreviewing() ) {
if (
getConfig( 'isWooPayEnabled' ) &&
getConfig( 'isWooPayEmailInputEnabled' ) &&
! isPreviewing()
) {
handleWooPayEmailInput( '#billing_email', api );
}
} );
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ jQuery( function ( $ ) {
return processPaymentIfNotUsingSavedMethod( $( 'form#order_review' ) );
} );

if ( getUPEConfig( 'isWooPayEnabled' ) && ! isPreviewing() ) {
if (
getUPEConfig( 'isWooPayEnabled' ) &&
getUPEConfig( 'isWooPayEmailInputEnabled' ) &&
! isPreviewing()
) {
handleWooPayEmailInput( '#billing_email', api );
}

Expand Down
7 changes: 3 additions & 4 deletions client/checkout/woopay/express-button/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global jQuery */
/**
* External dependencies
*/
Expand Down Expand Up @@ -58,16 +57,16 @@ const renderWooPayExpressCheckoutButtonWithCallbacks = () => {
renderWooPayExpressCheckoutButton( listenForCartChanges );
};

jQuery( ( $ ) => {
document.addEventListener( 'DOMContentLoaded', () => {
listenForCartChanges = {
start: () => {
$( document.body ).on(
document.body.addEventListener(
'updated_cart_totals',
renderWooPayExpressCheckoutButtonWithCallbacks
);
},
stop: () => {
$( document.body ).off(
document.body.removeEventListener(
'updated_cart_totals',
renderWooPayExpressCheckoutButtonWithCallbacks
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ jest.mock( '../use-express-checkout-product-handler', () => jest.fn() );
jest.spyOn( window, 'alert' ).mockImplementation( () => {} );

global.fetch = jest.fn( () => Promise.resolve( { json: () => ( {} ) } ) );
global.window.wc_add_to_cart_variation_params = {
i18n_make_a_selection_text: 'Mock text',
};

describe( 'WoopayExpressCheckoutButton', () => {
const buttonSettings = {
Expand All @@ -62,7 +59,6 @@ describe( 'WoopayExpressCheckoutButton', () => {
};
useExpressCheckoutProductHandler.mockImplementation( () => ( {
addToCart: mockAddToCart,
isAddToCartDisabled: false,
} ) );
} );

Expand Down Expand Up @@ -214,15 +210,21 @@ describe( 'WoopayExpressCheckoutButton', () => {
} );
} );

test( 'should shown an alert when clicking the button when add to cart button is disabled', () => {
test( 'should show an alert when clicking the button when add to cart button is disabled', () => {
getConfig.mockImplementation( ( v ) => {
return v === 'isWoopayFirstPartyAuthEnabled' ? false : 'foo';
} );
useExpressCheckoutProductHandler.mockImplementation( () => ( {
addToCart: mockAddToCart,
isAddToCartDisabled: true,
} ) );

// Add a disabled add to cart button to the DOM.
const addToCartButton = document.createElement( 'button' );
addToCartButton.classList.add( 'single_add_to_cart_button' );
addToCartButton.classList.add( 'disabled' );
addToCartButton.classList.add( 'wc-variation-selection-needed' );
document.body.appendChild( addToCartButton );

render(
<WoopayExpressCheckoutButton
isPreview={ false }
Expand All @@ -240,9 +242,10 @@ describe( 'WoopayExpressCheckoutButton', () => {
userEvent.click( expressButton );

expect( window.alert ).toBeCalledWith(
window.wc_add_to_cart_variation_params
.i18n_make_a_selection_text
'Please select your product options before proceeding.'
);

document.body.removeChild( addToCartButton );
} );

test( 'call `addToCart` and `expressCheckoutIframe` on express button click on product page', async () => {
Expand All @@ -252,7 +255,6 @@ describe( 'WoopayExpressCheckoutButton', () => {
useExpressCheckoutProductHandler.mockImplementation( () => ( {
addToCart: mockAddToCart,
getProductData: jest.fn().mockReturnValue( {} ),
isAddToCartDisabled: false,
} ) );
render(
<WoopayExpressCheckoutButton
Expand Down Expand Up @@ -288,7 +290,6 @@ describe( 'WoopayExpressCheckoutButton', () => {
useExpressCheckoutProductHandler.mockImplementation( () => ( {
addToCart: mockAddToCart,
getProductData: jest.fn().mockReturnValue( false ),
isAddToCartDisabled: false,
} ) );
render(
<WoopayExpressCheckoutButton
Expand Down
Loading
Loading