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 7.4.0 #8456

Merged
merged 68 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
4d6a60c
chore: remove unused UPE JS functions (#8296)
frosso Mar 4, 2024
241cd2d
Revert "Include payment title in order_placed Tracks event (#8252)" (…
malithsen Mar 4, 2024
25eb75f
Prevent sending shopper emails when disputes are closed (#8308)
brucealdridge Mar 4, 2024
a3a8dba
Refactor - `isInquiry` utility function to accept only dispute status…
nagpai Mar 5, 2024
6bf6c5f
E2E: Update expiry year for test cards to a future date (#8318) (#8322)
Jinksi Mar 5, 2024
59a46ad
Add server-side WooPay direct checkout eligibility flag (#8300)
ricardo Mar 5, 2024
0e85f83
Add additional checks for cart and checkout blocks for script handles…
bborman22 Mar 5, 2024
aa3fe7c
Add WooPay direct checkout data telemetry (#8247)
cesarcosta99 Mar 5, 2024
685ca7c
Direct Checkout Optimization: Preload Cart Session Data (#8267)
lovo-h Mar 5, 2024
c3f0118
Load deposit overview only when deposit is present (#8313)
naman03malhotra Mar 6, 2024
c120552
Ensure Link disabling when WooPay is simultaneously enabled by defaul…
timur27 Mar 6, 2024
91ec7d4
Hide Refund in Full option when a partial refund has already happened…
mgascam Mar 6, 2024
8a3d733
E2E: fix `merchant-orders-status-change` modal selector (#8333)
mgascam Mar 6, 2024
8c681e7
Inform hard blocked merchants they're under review (#8323)
oaratovskyi Mar 6, 2024
ca8c7c0
Merge trunk v7.3.0 into develop
botwoo Mar 6, 2024
a620f9d
Fix WCPay Tracks events recorded from Admin area (#8221)
malithsen Mar 7, 2024
f3feb0c
E2E: fix `merchant-orders-full-refund` missing order amount (#8319) (…
Jinksi Mar 7, 2024
0457e8b
Handle refunded webhook event (#8200)
mgascam Mar 7, 2024
bb876e1
Fix: Only Apply Woopay Direct Checkout Flow to the “Proceed to Checko…
lovo-h Mar 7, 2024
713362b
E2E: skip failing test suite `shopper-bnpls-checkout` (#8355) (#8358)
Jinksi Mar 8, 2024
47b046b
Reset onboarding stored test mode when reonboarding without URL param…
vladolaru Mar 8, 2024
6d26cff
Fixed Clearpay aria-label for UK sites (#8348)
gpressutto5 Mar 8, 2024
07c3e25
Validate deposit id before fetching deposit in `getDeposit()` (#8320)
shendy-a8c Mar 9, 2024
2bca6c8
Redirect input to terminal only when running through terminal (#8362)
timur27 Mar 11, 2024
dd07388
Ensure every gateway has individual settings object (#8361)
timur27 Mar 11, 2024
fc83801
Implement a feature flag for the Payment Overview widget (#8337)
mordeth Mar 11, 2024
ba1678e
Disputes: Update a more clear order note for dispute fund withdrawn e…
nagpai Mar 13, 2024
df88c5e
Set background-size: cover to fix PM icon styling issue (#8369)
mgascam Mar 13, 2024
fb3f730
Add WC Blocks webpack-rtl-plugin implementation to the project (#8338)
rafaelzaleski Mar 13, 2024
677741d
Initialises BNPL payment messaging element with Stripe account ID (#8…
FangedParakeet Mar 13, 2024
d706453
Added notice to inform merchant that their bank account has an error …
jessy-p Mar 14, 2024
d030c77
Deposits: Clean up remnant code from past A/B Experiment on Deposit L…
nagpai Mar 14, 2024
b0f8650
Removed deprecated deposit_status key from account status (#8376)
naman03malhotra Mar 14, 2024
aaa449f
Prevent double stock quantity reduction (#8335)
RadoslavGeorgiev Mar 14, 2024
9e98720
Updated the rest api docs for `deposits/overview-all` (#8364)
jessy-p Mar 14, 2024
18227bd
Client side routing to improve the navigation times for "View Deposit…
naman03malhotra Mar 15, 2024
211dee6
Re-enable Direct-to-Checkout Feature Flag in WooPay OTP Iframe (#8365)
rafaelzaleski Mar 15, 2024
df5cb52
Fix admin multi currency e2e tests (#8380)
cesarcosta99 Mar 15, 2024
8dc3f68
Add Loading Spinner to “Proceed to Checkout” Button, in Shortcode Car…
lovo-h Mar 15, 2024
be837a1
Fix UPE fields erroneously showing black background in some themes. (…
brettshumaker Mar 15, 2024
63ba2e2
refactor: validator package bundle size improvements (#8402)
frosso Mar 18, 2024
f15c223
fix: error handling when saved card and amount too large (#8411)
frosso Mar 18, 2024
86af532
Fix deprecated strtolower on order received page (#8387)
reykjalin Mar 18, 2024
67e989e
Add settings object for every gateway (#8414)
timur27 Mar 18, 2024
280f028
skip main gateway from updates on migration script (#8419)
timur27 Mar 19, 2024
3ab1e66
fix: add payment method page initialization on missing UPE styles (#8…
frosso Mar 19, 2024
6a22e18
Added a notice about custom checkout fields conflicting with express …
gpressutto5 Mar 19, 2024
c266b38
Adds notice that deposits are paused to Deposits Listing screen (#8347)
jessy-p Mar 20, 2024
fa5adee
Allow WooPay button preview on settings page (#8422)
LCmry Mar 20, 2024
695ceec
Fix WooPay direct checkout eligibility check (#8406)
ricardo Mar 20, 2024
4d46126
Allow Sandbox accounts to be deleted at any moment of the account lif…
elazzabi Mar 21, 2024
fffc2cf
Make cursor disabled when hovering over disabled checkboxes (#8431)
elazzabi Mar 21, 2024
57e2583
Revert removing depositsStatus key from account request. (#8432)
shendy-a8c Mar 21, 2024
9a5b112
Create e2e test report issue template (#8420)
cesarcosta99 Mar 21, 2024
c363808
Allow WooPay to request session data from merchant (#8268)
bborman22 Mar 21, 2024
382ac64
Minor copy improvements on the Settings page (#8410)
anu-rock Mar 22, 2024
2ea2fd6
Move test notice for transactions to the top (#8430)
vladolaru Mar 22, 2024
ee235db
Bump WC tested up to 8.7.0 and set Requires Plugins header. (#8441)
shendy-a8c Mar 22, 2024
294756f
Customizing BNPL messaging with Appearance API (#8421)
gpressutto5 Mar 22, 2024
98846e6
Update/jetpack sync options (#8442)
vladolaru Mar 22, 2024
e06be63
Update the Payments Connect page design and logic (#8378)
oaratovskyi Mar 22, 2024
3921f65
Fix/2593 disabling woopay express avoids disabling direct checkout (#…
lovo-h Mar 22, 2024
5624964
Added empty check on meta key and meta value getting order id from me…
zmaglica Mar 22, 2024
a5ecdf6
Add woopayMinimumSessionData in wcpayConfig when Express Checkout but…
lovo-h Mar 22, 2024
61cce82
Reduce Amount of Steps in the MOX (#8426)
dmallory42 Mar 22, 2024
bc8ae14
Update phpcs and related sniffs (#8415)
reykjalin Mar 22, 2024
360b2da
Revert "Update phpcs and related sniffs" (#8455)
jessy-p Mar 25, 2024
0e382bf
Update version and add changelog entries for release 7.4.0
github-actions[bot] Mar 25, 2024
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
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/e2e_test_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: e2e test report
about: Report an e2e test failure.
title: ''
labels: ['category: e2e', 'needs triage']
assignees: ''

---

### Description
<!-- Before reporting an issue, are you sure this e2e test is failing consistently? -->
<!-- Add a clear and concise description of what the issue is. Please, be as descriptive as possible. -->
<!-- Make sure you include relevant details such as what test/spec is failing and the link of the job where it started failing. -->

**Output from the test failure**:
<!-- Chunk of the output from the test failure. It doesn't need to be the entire output, just the relevant part. e.g.
TimeoutError: waiting for selector "..." failed: timeout 100000ms exceeded
336 | );
> 337 | const selector = await page.waitForSelector(
| ^
339 | 'selector'
-->

### Additional context
<!-- Any additional context or details you think might be helpful. -->
<!-- Ticket numbers/links, plugin versions, system statuses etc. -->

### Priority
<!-- Add a priority label based on your best judgement (quick is fine). -->
<!-- Optional: add comments here to explain your decision or highlight any questions/potential risks. -->

### Reason why this e2e test is broken
<!-- Add one of the "e2e: broken flow/test/environment" labels based on your best judgement (quick is fine). -->
<!-- Optional: add comments here to explain your decision. -->

> [!Important]
> Please, ensure when closing this issue (PR fix) that only one `e2e: broken` label is added and it is accurate.
> - [ ] I confirmed there's only one `e2e: broken` label in this issue and it is accurate.
<!-- Leave the above for who's fixing this issue. -->
7 changes: 5 additions & 2 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/bin/bash
. "$(dirname "$0")/_/husky.sh"

# Allows us to read user input below, redirects script's input to the terminal.
exec < /dev/tty
# check if main stream (stdout and stderr) are attached to the terminal
if [ -t 1 ] && [ -t 2 ]; then
# Allows us to read user input below, redirects script's input to the terminal.
exec < /dev/tty
fi

PROTECTED_BRANCH=("develop" "trunk")
CURRENT_BRANCH=$(git branch --show-current)
Expand Down
7 changes: 2 additions & 5 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
#adminmenu
#toplevel_page_wc-admin-path--payments-connect
.menu-icon-generic
div.wp-menu-image::before,
#adminmenu
#toplevel_page_wc-admin-path--payments-deposits
.menu-icon-generic
div.wp-menu-image::before {
font-family: 'WCPay' !important;
content: '\e900';
Expand All @@ -36,7 +32,8 @@
height: 1.25rem;
width: 32px;
width: 2rem;
background-size: contain;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
border-radius: 2px;
outline: 1px solid rgba( 0, 0, 0, 0.25 );
Expand Down
7 changes: 2 additions & 5 deletions assets/css/admin.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
#adminmenu
#toplevel_page_wc-admin-path--payments-connect
.menu-icon-generic
div.wp-menu-image::before,
#adminmenu
#toplevel_page_wc-admin-path--payments-deposits
.menu-icon-generic
div.wp-menu-image::before {
font-family: 'WCPay' !important;
content: '\e900';
Expand All @@ -36,7 +32,8 @@
height: 1.25rem;
width: 32px;
width: 2rem;
background-size: contain;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
border-radius: 2px;
outline: 1px solid rgba( 0, 0, 0, 0.25 );
Expand Down
12 changes: 12 additions & 0 deletions assets/images/cards/cb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 6 additions & 41 deletions assets/images/cards/diners.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/images/payment-methods/afterpay-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
*** WooPayments Changelog ***

= 7.4.0 - 2024-03-27 =
* Add - Add account reset for sandboxes
* Add - Add a loading spinner to the "Proceed to Checkout" button in shortcode cart.
* Add - Add data telemetry for the Proceed to Checkout button and the WooPay direct checkout.
* Add - Added a notice about custom checkout fields conflicting with express checkouut
* Add - Added a notice to inform the merchant when the payout bank account is in errored state
* Add - Added a notice to the Deposits Listing screen when deposits are paused
* Add - Add WooPay direct checkout flow behind a server-side feature flag.
* Add - Add woopayMinimumSessionData in wcpayConfig when Express Checkout button's disabled o on car page.
* Add - Customizing BNPL messaging with Appearance API
* Add - Handle refunds triggered externally, outside WP Admin
* Add - Preload WooPay session data for WooPay Direct Checkout flow.
* Fix - Add empty validation when quering order by meta key and meta value
* Fix - Add settings object for every gateway
* Fix - Allow WooPay button preview on settings page
* Fix - Apply the WooPay Direct Checkout flow only to the "Proceed to Checkout" button, in cthe classic cart.
* Fix - Ensure card gateway is not running through the settings migration.
* Fix - Ensure every gateway has individual settings object.
* Fix - Ensure WooPay Direct Checkout continues to work as intended when WooPay Express Checkout is disabled on the cart page.
* Fix - fix: "Add payment method" page initialization on missing UPE styles
* Fix - fix: better error message when saved card and amount too large
* Fix - Fixed a 1px gap on the right side of some payment method icons in transaction details.
* Fix - Fixed Clearpay aria-label for UK sites
* Fix - Fixes some instances where Stripe UPE styles add a black background to input fields.
* Fix - Fix the cursor pointer when hovering over disabled checkboxes in Advanced Settings
* Fix - Fix WooPay direct checkout eligibility checks.
* Fix - Hide the option to refund in full from the transaction details menu when a transaction is partially refunded.
* Fix - Inform hard blocked merchants they're under review
* Fix - Load deposit overview only when deposit is present
* Fix - Move test mode transactions notice to the top of the page.
* Fix - Order completed and refunded emails are no longer sent when a dispute is closed.
* Fix - Preventing stock quantity from being reduced twice.
* Fix - Re-enable Direct-to-Checkout Feature Flag in WooPay OTP Iframe.
* Fix - strtolower deprecation warning no longer appears on the Order Received and View Order pages when using PHP version 8.1+
* Fix - Used client side navigation to improve the UX for "View Deposit History"
* Fix - Uses WCPayAPI to initialise Stripe for BNPL payment element, includes necessary required parameters.
* Update - Allow WooPay to request full session data from store.
* Update - Clean up remaining unused code from a past experiment - `wcpay_empty_state_preview_mode`, done on Deposits list.
* Update - Make the order note for `dispute funds withdrawn` event clearly mention that the dispute amount and fee would be deducted from the next deposit.
* Update - Remove mention of test mode from general settings help text.
* Update - Updated deposits API documentation to add default_external_accounts element
* Update - Updates to reduce the amount of steps required during onboarding flow.
* Update - Update the Payments Connect page design and logic
* Update - Validate deposit id before sending a request to fetch deposit.
* Dev - Bump WC tested up to version to 8.7.0 and set Requires Plugins header.
* Dev - Ensure pre-push hook understands terminal & non-terminal environments
* Dev - Fix a bug in Tracks where admin events were not recorded properly
* Dev - Implement a feature flag for the Payment Overview widget.
* Dev - Minor refactor to disputes utility function inInquiry to make it accept only dispute status as a param, instead of whole dispute object.
* Dev - refactor: validator package bundle size improvements

= 7.3.0 - 2024-03-06 =
* Add - Added confirmation modals for order status changes with pending authorizations
* Add - Add migration script to cover situations with Link and WooPay both enabled after plugin update.
Expand Down
69 changes: 69 additions & 0 deletions client/cart/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* Internal dependencies
*/
import { recordUserEvent } from 'tracks';
import { getConfig } from 'wcpay/utils/checkout';
import WooPayDirectCheckout from 'wcpay/checkout/woopay/direct-checkout/woopay-direct-checkout';

const recordProceedToCheckoutButtonClick = () => {
recordUserEvent( 'wcpay_proceed_to_checkout_button_click', {
woopay_direct_checkout: Boolean(
getConfig( 'isWooPayDirectCheckoutEnabled' )
),
} );
};

const addProceedToCheckoutTracking = () => {
Object.values( WooPayDirectCheckout.redirectElements ).forEach(
( className ) => {
const proceedButton = document.querySelector( className );

if ( ! proceedButton ) {
return;
}

proceedButton.addEventListener(
'click',
recordProceedToCheckoutButtonClick
);
}
);
};

/**
* We need to register a MutationObserver in the classic checkout because if the
* user updates something in the cart page, the entire "Cart totals" section is
* re-rendered and the event listener is lost. For this reason, we need to register
* the event listener again, and just for that particular "Proceed to checkout" button.
*
* @return {void}
*/
const registerClassicCartCollateralsObserver = () => {
const cartCollateralsNode = document.querySelector( '.cart-collaterals' );

if ( ! cartCollateralsNode ) {
return;
}

const observer = new MutationObserver( () => {
const proceedButton = document.querySelector(
WooPayDirectCheckout.redirectElements.CLASSIC_CART_PROCEED_BUTTON
);

if ( ! proceedButton ) {
return;
}

proceedButton.addEventListener(
'click',
recordProceedToCheckoutButtonClick
);
} );

observer.observe( cartCollateralsNode, { childList: true, subtree: true } );
};

window.addEventListener( 'load', () => {
addProceedToCheckoutTracking();
registerClassicCartCollateralsObserver();
} );
6 changes: 3 additions & 3 deletions client/checkout/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,13 @@ export default class WCPayAPI {
* Saves the calculated UPE appearance values in a transient.
*
* @param {Object} appearance The UPE appearance object with style values
* @param {string} isBlocksCheckout 'true' if save request is for Blocks Checkout. Default 'false'.
* @param {string} elementsLocation The location of the elements.
*
* @return {Promise} The final promise for the request to the server.
*/
saveUPEAppearance( appearance, isBlocksCheckout = 'false' ) {
saveUPEAppearance( appearance, elementsLocation ) {
return this.request( getConfig( 'ajaxUrl' ), {
is_blocks_checkout: isBlocksCheckout,
elements_location: elementsLocation,
appearance: JSON.stringify( appearance ),
action: 'save_upe_appearance',
// eslint-disable-next-line camelcase
Expand Down
2 changes: 1 addition & 1 deletion client/checkout/blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ if ( getUPEConfig( 'isWooPayEnabled' ) ) {
handleWooPayEmailInput( '#email', api, true );
}

if ( getUPEConfig( 'isWoopayExpressCheckoutEnabled' ) ) {
if ( getUPEConfig( 'shouldShowWooPayButton' ) ) {
registerExpressPaymentMethod( wooPayExpressCheckoutPaymentMethod() );
}
}
Expand Down
4 changes: 2 additions & 2 deletions client/checkout/blocks/payment-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ const PaymentElements = ( { api, ...props } ) => {
useEffect( () => {
async function generateUPEAppearance() {
// Generate UPE input styles.
let upeAppearance = getAppearance( true );
let upeAppearance = getAppearance( 'blocks_checkout' );
upeAppearance = await api.saveUPEAppearance(
upeAppearance,
'true'
'blocks_checkout'
);
setAppearance( upeAppearance );
}
Expand Down
5 changes: 4 additions & 1 deletion client/checkout/classic/payment-processing.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ async function initializeAppearance( api ) {
return Promise.resolve( appearance );
}

return await api.saveUPEAppearance( getAppearance() );
return await api.saveUPEAppearance(
getAppearance( 'shortcode_checkout' ),
'shortcode_checkout'
);
}

/**
Expand Down
6 changes: 0 additions & 6 deletions client/checkout/classic/test/3ds-flow-handling.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
*/
import { showAuthenticationModalIfRequired } from '../3ds-flow-handling';

jest.mock( 'wcpay/checkout/utils/upe', () => {
return {
isWCPayChosen: jest.fn( () => true ),
};
} );

describe( 'showAuthenticationModalIfRequired', () => {
it( 'Should stop processing when no confirmation is needed', () => {
const replaceStateSpy = jest.spyOn( history, 'replaceState' );
Expand Down
3 changes: 2 additions & 1 deletion client/checkout/classic/test/payment-processing.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ describe( 'Stripe Payment Element mounting', () => {

expect( getAppearance ).toHaveBeenCalled();
expect( apiMock.saveUPEAppearance ).toHaveBeenCalledWith(
appearanceMock
appearanceMock,
'shortcode_checkout'
);
expect( dispatchMock ).toHaveBeenCalled();
} );
Expand Down
Loading
Loading