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.6.0 #8778

Merged
merged 62 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
2d2aeb0
Fixes "Invalid recurring shipping method" errors when purchasing mult…
mattallan Apr 14, 2024
6f898ad
Hide Fraud info banner until first transaction happens (#8643)
daquinons Apr 16, 2024
01e7a65
Only try to load Stripe's PaymentMethodMessagingElement on supported …
brettshumaker Apr 16, 2024
1b9b52a
Reporting: Fix spelling of `Payments` to `Payment` (#8630)
nagpai Apr 17, 2024
45719a0
Use Reporting API in components (#8589)
jessy-p Apr 17, 2024
4f8b9e7
Merge trunk v7.5.0 into develop
botwoo Apr 17, 2024
166c038
add currency code to cart and checkout block totals when mccy is enab…
reykjalin Apr 17, 2024
db3f524
Avoid updating billing details for legacy card objects (#8664)
timur27 Apr 18, 2024
d3dc84b
fix: BNPL announcement link (#8663)
frosso Apr 18, 2024
3e4160e
Detect multiple enabled payment methods of the same type (#8513)
timur27 Apr 18, 2024
8c239ae
Merge trunk v7.5.1 into develop
botwoo Apr 18, 2024
f404b37
Remove filter from Disputes Report (#8667)
jessy-p Apr 18, 2024
b12c6c6
Add Playwright e2e test suite ready for incremental migration and vis…
Jinksi Apr 19, 2024
2bb20b1
Add payment activity widget emoji survey (#8506)
Jinksi Apr 19, 2024
ae45316
(Client) Remove obsolete `version` key from `docker-compose.yml` file…
Jinksi Apr 19, 2024
bf6f2cd
misc: remove deprecated param from asset data registry (#8666)
timur27 Apr 19, 2024
1626b35
REST client: add extra headers to track network latency. (#8613)
kalessil Apr 19, 2024
4f6ed1b
Reporting: Add tooltips to each Payment activity widget tile (#8659)
nagpai Apr 19, 2024
5a9a10e
Ensure WooPay Preview Matches The Actual Implementation (#8649)
lovo-h Apr 19, 2024
ea047e4
Reporting: Fix date filter on `View report` link on Disputes tile, wi…
nagpai Apr 19, 2024
3db8902
Prevent Stripe Link from triggering the checkout fields warning (#8670)
gpressutto5 Apr 19, 2024
066fcfd
Adjust positioning of BNPL messaging on the classic cart page. (#8671)
brettshumaker Apr 19, 2024
a5b8be2
Merge trunk v7.5.2 into develop
botwoo Apr 22, 2024
f0c8a56
Merge trunk v7.5.3 into develop
botwoo Apr 22, 2024
5472a12
Improve survey controller validation and remove upe from route path (…
shendy-a8c Apr 22, 2024
9499d0f
Remove legacy `has_adapted_extension_installed` method from `WooPay_U…
ricardo Apr 23, 2024
5cb00c4
Update payment activity survey key (#8694)
Jinksi Apr 23, 2024
9893900
Add source param to onboarding and complete KYC links (#8668)
oaratovskyi Apr 23, 2024
8732356
Pre check save my info for certain countries (#8608)
leonardola Apr 23, 2024
9b6d54c
Improve merchant session request with preloaded data (#8645)
cesarcosta99 Apr 24, 2024
ba97c20
Remove the feature flag for the pay-for-order flow (#8699)
hsingyuc Apr 24, 2024
3c33fef
Improve signing of minimum WooPay session data (#8681)
ricardo Apr 24, 2024
d7da311
Remove risk review references from the transactions page (#8698)
eduardoumpierre Apr 25, 2024
aca0839
Fix issue with transient check related to fraud protection settings (…
jessepearson Apr 25, 2024
13105b3
Add more points to the Compatibility service (#8712)
daquinons Apr 25, 2024
e6df286
Treat AVS mismatch errors as fraud blocks if the advanced fraud rule …
eduardoumpierre Apr 25, 2024
0c1f6c0
fix: checkout warning with Stripe Link (#8711)
frosso Apr 26, 2024
ba36a35
Fixed exception that would happen when pre_check_save_my_info was not…
leonardola Apr 26, 2024
0d89ec7
Update post-release-updates GitHub Actions workflow to delete all tra…
alopezari Apr 29, 2024
eddecf7
Fix type error for fraud outcome API (#8713)
jessepearson Apr 29, 2024
993ff40
Update README to explain how the WCPay Dev Tools plugin is automatica…
alopezari Apr 29, 2024
c9a8761
Track used gateway when placing the order (#8717)
malithsen Apr 29, 2024
3c6bba1
misc: fix warning during plugin update due to problems with initializ…
timur27 Apr 29, 2024
ebee3fe
tweak emoji survey prompt - "these", was "those" (#8725)
haszari Apr 29, 2024
15e8a88
Use correct currency in Payment Activity Card (#8701)
Jinksi Apr 29, 2024
0d5b2e1
Add bnpl logos to thank you page. (#8650)
brettshumaker Apr 30, 2024
b4d4a0b
Reporting: Track events for `View report` links on Payment activity w…
nagpai May 1, 2024
4919b0f
Add PRBs support for `express_checkout_enabled ` settings while detec…
timur27 May 1, 2024
bf7a243
Fix WooPay tracks user ID for logged in users (#8690)
rafaelzaleski May 1, 2024
8882064
Revert Add Multi-Currency Support to Page Caching via Cookies (#8738)
ricardo May 1, 2024
dd28695
Allow non-account-owner admin users to submit the payment activity su…
Jinksi May 2, 2024
b6e8874
Reporting: Fix the `View report` link URL on Total payment volume til…
nagpai May 2, 2024
04352d5
Fix QIT warning in WooPay session endpoint (#8760)
cesarcosta99 May 2, 2024
251a560
Update View Report link of Charges data highlight tile. (#8766)
jessy-p May 3, 2024
80e006e
Reporting: Fix the `View report` link on the Refunds tile of Payment …
nagpai May 3, 2024
d27b16f
Terminal In-Person Payments auto-renewing subscription support (#8390)
joshheald May 3, 2024
a4c1b31
Add notice and notification in Advanced Fraud Settings page (#8762)
daquinons May 3, 2024
a39500c
Update version and add changelog entries for release 7.6.0
github-actions[bot] May 5, 2024
10783bb
Upgrade jetpack sync package version (#8763)
zmaglica May 6, 2024
5134e4c
Escape attributes added/edited in #8650 (#8787)
brettshumaker May 6, 2024
1d69163
Fix/7.6.0 constructor injection upgrade bug (#8794)
joshheald May 7, 2024
25c5273
Amend changelog entries for release 7.6.0
botwoo May 7, 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
17 changes: 17 additions & 0 deletions .github/actions/e2e-pw/run-log-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Run Tests'
description: 'Runs Playwright E2E tests'

runs:
using: 'composite'
steps:
- name: First Run Playwright E2E Tests
id: first_run_e2e_pw_tests
# Use +e to trap errors when running E2E tests.
shell: /bin/bash +e {0}
run: npm run test:e2e-pw-ci
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 7
74 changes: 74 additions & 0 deletions .github/workflows/e2e-pw-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: E2E Playwright Tests - Pull Request

on:
pull_request:
branches:
- develop
- trunk
workflow_dispatch:
workflow_call:
inputs:
wcpay-use-build-artifact:
type: boolean
required: false
default: false
repo-branch:
type: string
required: false
description: 'Branch to be used for running tests'

env:
E2E_GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
WCP_DEV_TOOLS_REPO: ${{ secrets.WCP_DEV_TOOLS_REPO }}
WCP_DEV_TOOLS_BRANCH: 'trunk'
WCP_SERVER_REPO: ${{ secrets.WCP_SERVER_REPO }}
WC_SUBSCRIPTIONS_REPO: ${{ secrets.WC_SUBSCRIPTIONS_REPO }}
E2E_BLOG_ID: ${{ secrets.E2E_BLOG_ID }}
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
WCPAY_USE_BUILD_ARTIFACT: ${{ inputs.wcpay-use-build-artifact }}
WCPAY_ARTIFACT_DIRECTORY: 'zipfile'
NODE_ENV: 'test'
FORCE_E2E_DEPS_SETUP: true

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
wcpay-e2e-tests:
runs-on: ubuntu-latest

name: WC - latest

env:
E2E_WP_VERSION: 'latest'
E2E_WC_VERSION: 'latest'

steps:
- name: Checkout WCPay repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.repo-branch || github.ref }}

- name: 'Download WooCommerce Payments build file'
if: ${{ inputs.wcpay-use-build-artifact }}
uses: actions/download-artifact@v4
with:
name: woocommerce-payments
path: ${{ env.WCPAY_ARTIFACT_DIRECTORY }}

- name: Setup E2E environment
uses: ./.github/actions/e2e/env-setup

- name: Install Playwright
shell: bash
run: npx playwright install chromium

- name: Run tests, upload screenshots & logs
uses: ./.github/actions/e2e-pw/run-log-tests
4 changes: 3 additions & 1 deletion .github/workflows/post-release-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ jobs:
echo ":warning: File "$NEXT_RELEASE_VERSION_INSTRUCTIONS_FILENAME.md" already exists. No action needed." >> $GITHUB_STEP_SUMMARY
fi

# If an entry for the next version doesn't exist yet
# Check if this release version exists in Release-testing-instructions.md
if ! grep -q "v$NEXT_RELEASE_VERSION" Release-testing-instructions.md; then
# If it doesn't exist, remove all trailing newlines and add the new version for this release
perl -pi -e 'BEGIN{undef $/;} s/\n+\z//' Release-testing-instructions.md
echo -ne "\n* [v$NEXT_RELEASE_VERSION](https://github.com/Automattic/woocommerce-payments/wiki/$NEXT_RELEASE_VERSION_INSTRUCTIONS_FILENAME)" >> Release-testing-instructions.md
echo "Added a new entry for v$NEXT_RELEASE_VERSION in \"Release-testing-instructions.md\"." >> $GITHUB_STEP_SUMMARY
HAS_CHANGES=true
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,12 @@ tests/e2e/screenshots
# E2E Performance test results
tests/e2e/reports

# E2E Playwright
/playwright-report/
/blob-report/
tests/e2e-pw/.auth/
tests/e2e-pw/test-results/
tests/e2e-pw/playwright/.cache/
tests/e2e-pw/tests/e2e-pw/.auth/*
# Slate docs
docs/rest-api/build/*
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Install the following plugins:

- WooCommerce
- WCPay Dev Tools (clone or download [the GitHub repo](https://github.com/Automattic/woocommerce-payments-dev-tools))
- This dependency is automatically updated to the latest version each time you perform a `git pull` or `git merge` in this repository, as long as the WCPay Dev Tools repository is cloned locally and remains on the `trunk` branch. For more details, please refer to the [post-merge](.husky/post-merge) hook.

### Optional local.env file

Expand Down
8 changes: 6 additions & 2 deletions assets/css/success.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.wc-payment-gateway-method-name-woopay-wrapper {
.wc-payment-gateway-method-logo-wrapper {
display: flex;
align-items: center;
flex-wrap: wrap;
line-height: 1;
}

.wc-payment-gateway-method-name-woopay-wrapper img {
.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;
}
8 changes: 6 additions & 2 deletions assets/css/success.rtl.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.wc-payment-gateway-method-name-woopay-wrapper {
.wc-payment-gateway-method-logo-wrapper {
display: flex;
align-items: center;
flex-wrap: wrap;
line-height: 1;
}

.wc-payment-gateway-method-name-woopay-wrapper img {
.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;
}
36 changes: 36 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
*** WooPayments Changelog ***

= 7.6.0 - 2024-05-08 =
* Add - Add additional data to Compatibility service
* Add - Add User Satisfaction Survey for Payments Overview Widget
* Add - Detect payment methods enabled by multiple payment gateways.
* Add - Display BNPL payment method logos on the thank you page.
* Add - Non user-facing changes. Behind feature flag. Add tooltip messages to tiles within Payment activity widget
* Add - Not user-facing: hidden behind feature flag. Use Reporting API to fetch and populate data in the Payment Activity widget.
* Add - Pre check save my info for eligible contries
* Add - Support for starting auto-renewing subscriptions for In-Person Payments.
* Fix - Add notice when no rules are enabled in advanced fraud settings
* Fix - Adjust positioning of BNPL messaging on the classic cart page.
* Fix - Avoid updating billing details for legacy card objects.
* Fix - Ensure the WooPay preview in the admin dashboard matches the actual implementation.
* Fix - fix: BNPL announcement link.
* Fix - fix: Stripe terms warning at checkout when Link is enabled
* Fix - Fix issue with transient check related to fraud protection settings.
* Fix - Fix order notes entry and risk meta box content when a payment is blocked due to AVS checks while the corresponding advanced fraud rule is enabled.
* Fix - Fix type error for fraud outcome API.
* Fix - Fix WooPay tracks user ID for logged in users.
* Fix - Hide Fraud info banner until first transaction happens
* Fix - Improve merchant session request with preloaded data.
* Fix - Improve signing of minimum WooPay session data.
* Fix - Make sure an explicit currency code is present in the cart and checkout blocks when multi-currency is enabled
* Fix - Prevent Stripe Link from triggering the checkout fields warning
* Fix - Remove risk review request from the transactions page.
* Fix - Resolves "Invalid recurring shipping method" errors when purchasing multiple subscriptions with Apple Pay and Google Pay.
* Fix - Revert: Add Multi-Currency Support to Page Caching via Cookies.
* Update - Add source param to onboarding and complete KYC links
* Update - Add support of a third-party plugin with PRBs into duplicates detection mechanism.
* Update - Remove feature flag for the pay-for-order flow
* Dev - Add Playwright e2e test suite ready for incremental migration and visual regression testing
* Dev - Avoid warnings about fatal error during plugin update due to problems with plugin initialization.
* Dev - Remove legacy method from `WooPay_Utilities`.
* Dev - Remove obsolete docker-compose key `version`
* Dev - Upgraded jetpack sync package version.

= 7.5.3 - 2024-04-22 =
* Fix - Fix subscription renewals exceptions
* Dev - Remove deprecated param from asset data registry interface.
Expand Down
21 changes: 20 additions & 1 deletion client/checkout/blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
/**
* Internal dependencies
*/
import { getUPEConfig } from 'utils/checkout';
import { getUPEConfig, getConfig } from 'utils/checkout';
import { isLinkEnabled } from '../utils/upe';
import WCPayAPI from '../api';
import { SavedTokenHandler } from './saved-token-handler';
Expand Down Expand Up @@ -158,3 +158,22 @@ window.addEventListener( 'load', () => {
enqueueFraudScripts( getUPEConfig( 'fraudServices' ) );
addCheckoutTracking();
} );

// If multi-currency is enabled, add currency code to total amount in cart and checkout blocks.
if ( getConfig( 'isMultiCurrencyEnabled' ) ) {
const { registerCheckoutFilters } = window.wc.blocksCheckout;

const modifyTotalsPrice = ( defaultValue, extensions, args ) => {
const { cart } = args;

if ( cart?.cartTotals?.currency_code ) {
return `<price/> ${ cart.cartTotals.currency_code }`;
}

return defaultValue;
};

registerCheckoutFilters( 'woocommerce-payments', {
totalValue: modifyTotalsPrice,
} );
}
59 changes: 35 additions & 24 deletions client/checkout/blocks/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,37 +44,48 @@ button.wcpay-stripelink-modal-trigger:hover {
border-color: transparent;
}

.wc-block-checkout__payment-method
.wc-block-components-radio-control__label
span {
width: 95%;

&:has( .StripeElement ) {
display: grid;
grid-template-columns: 1fr auto;
}
.wc-block-checkout__payment-method {
.wc-block-components-radio-control__label span {
width: 95%;

img {
float: right;
border: 0;
padding: 0;
height: 24px;
max-height: 24px;
}
&:has( .StripeElement ) {
display: grid;
grid-template-columns: 1fr auto;
}

.StripeElement {
width: 100%;
grid-column: 1 / span 2;
grid-row-start: 2;
pointer-events: none;
img {
float: right;
border: 0;
padding: 0;
height: 24px;
max-height: 24px;
}

+ img {
grid-row: 1 / span 2;
grid-column: 2;
.StripeElement {
width: 100%;
grid-column: 1 / span 2;
grid-row-start: 2;
pointer-events: none;

+ img {
grid-row: 1 / span 2;
grid-column: 2;
}
}
}
}

#remember-me {
margin-top: 36px;

h2 {
font-size: 18px;
font-weight: 600;
line-height: 21.6px;
letter-spacing: -0.01em;
}
}

#payment-method {
label.wc-block-components-radio-control__option-checked {
.StripeElement {
Expand Down
4 changes: 3 additions & 1 deletion client/checkout/utils/upe.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import { getPaymentMethodsConstants } from '../constants';
*/
export const getTerms = ( paymentMethodsConfig, value = 'always' ) => {
const reusablePaymentMethods = Object.keys( paymentMethodsConfig ).filter(
( method ) => paymentMethodsConfig[ method ].isReusable
( method ) =>
// Stripe link doesn't need the "terms" - adding this property causes a warning in the console.
method !== 'link' && paymentMethodsConfig[ method ].isReusable
);

return reusablePaymentMethods.reduce( ( obj, method ) => {
Expand Down
21 changes: 8 additions & 13 deletions client/checkout/woopay/direct-checkout/woopay-direct-checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import request from 'wcpay/checkout/utils/request';
import { buildAjaxURL } from 'wcpay/payment-request/utils';
import UserConnect from 'wcpay/checkout/woopay/connect/user-connect';
import SessionConnect from 'wcpay/checkout/woopay/connect/session-connect';
import { getTracksIdentity } from 'tracks';

/**
* The WooPayDirectCheckout class is responsible for injecting the WooPayConnectIframe into the
Expand Down Expand Up @@ -173,22 +172,18 @@ class WooPayDirectCheckout {
throw new Error( 'Invalid encrypted session data.' );
}

const testMode = getConfig( 'testMode' );
const {
blog_id, // eslint-disable-line camelcase
data: { session, iv, hash },
} = redirectData;
const redirectParams = new URLSearchParams( {
checkout_redirect: 1,
blog_id: redirectData.blog_id,
session: redirectData.data.session,
iv: redirectData.data.iv,
hash: redirectData.data.hash,
testMode,
source_url: window.location.href,
blog_id,
session,
iv,
hash,
} );

const tracksUserId = await getTracksIdentity();
if ( tracksUserId ) {
redirectParams.append( 'tracksUserIdentity', tracksUserId );
}

const redirectUrl =
getConfig( 'woopayHost' ) + '/woopay/?' + redirectParams.toString();

Expand Down
6 changes: 6 additions & 0 deletions client/checkout/woopay/email-input-iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,12 @@ export const handleWooPayEmailInput = async (
openIframe( email );
} else if ( data.code !== 'rest_invalid_param' ) {
recordUserEvent( 'checkout_woopay_save_my_info_offered' );

if ( window.woopayCheckout?.PRE_CHECK_SAVE_MY_INFO ) {
recordUserEvent( 'checkout_save_my_info_click', {
status: 'checked',
} );
}
}
} )
.catch( ( err ) => {
Expand Down
12 changes: 2 additions & 10 deletions client/checkout/woopay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,13 @@ const renderSaveUserSection = () => {
);

if ( blocksCheckout.length ) {
const checkoutPageSaveUserContainer = document.createElement(
'fieldset'
);
const checkoutPageSaveUserContainer = document.createElement( 'div' );
const paymentOptions = document.getElementsByClassName(
'wp-block-woocommerce-checkout-payment-block'
)?.[ 0 ];
const isPaymentOptionsNumbered = paymentOptions?.classList?.contains(
'wc-block-components-checkout-step--with-step-number'
);

checkoutPageSaveUserContainer.className =
'wc-block-checkout__payment-method wp-block-woocommerce-checkout-remember-block ' +
`wc-block-components-checkout-step wc-block-components-checkout-step${
isPaymentOptionsNumbered ? '--with-step-number' : ''
}`;
'wc-block-checkout__payment-method wp-block-woocommerce-checkout-remember-block ';
checkoutPageSaveUserContainer.id = 'remember-me';

if ( paymentOptions ) {
Expand Down
Loading
Loading