Skip to content

Commit

Permalink
Merge branch 'develop' into fix/woopay-direct-checkout-guest-subscrip…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
alefesouza authored Nov 29, 2024
2 parents 52fa458 + b0b67af commit 8667c9e
Show file tree
Hide file tree
Showing 116 changed files with 1,736 additions and 1,795 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ vendor/*
release/*
tests/e2e/docker*
tests/e2e/deps*

# We'll delete the directory and its contents as part of https://github.com/Automattic/woocommerce-payments/issues/9722 .
# ignoring it because we're temporariily cleaning it up.
client/tokenized-payment-request
34 changes: 17 additions & 17 deletions .github/workflows/e2e-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ on:
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
E2E_GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
WCP_DEV_TOOLS_REPO: ${{ secrets.WCP_DEV_TOOLS_REPO }}
WCP_DEV_TOOLS_BRANCH: 'trunk'
TRANSACT_PLATFORM_SERVER_REPO: ${{ secrets.TRANSACT_PLATFORM_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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-pw-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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 }}
TRANSACT_PLATFORM_SERVER_REPO: ${{ secrets.TRANSACT_PLATFORM_SERVER_REPO }}
WC_SUBSCRIPTIONS_REPO: ${{ secrets.WC_SUBSCRIPTIONS_REPO }}
E2E_BLOG_ID: ${{ secrets.E2E_BLOG_ID }}
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ on:
workflow_dispatch:

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'
WC_MIN_SUPPORTED_VERSION: '7.6.0'
NODE_ENV: 'test'
FORCE_E2E_DEPS_SETUP: true
E2E_GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
WCP_DEV_TOOLS_REPO: ${{ secrets.WCP_DEV_TOOLS_REPO }}
WCP_DEV_TOOLS_BRANCH: 'trunk'
TRANSACT_PLATFORM_SERVER_REPO: ${{ secrets.TRANSACT_PLATFORM_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'
WC_MIN_SUPPORTED_VERSION: '7.6.0'
NODE_ENV: 'test'
FORCE_E2E_DEPS_SETUP: true

jobs:
generate-matrix:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: PHP Compatibility

on:
pull_request
#pull_request # Workflow disabled temporarily until PHP Compatibility fixes are in place
workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
1 change: 1 addition & 0 deletions assets/images/illustrations/setup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** WooPayments Changelog ***

= 8.5.1 - 2024-11-25 =
* Fix - fix: remove "test mode" badge from shortcode checkout.

= 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.
Expand Down
4 changes: 4 additions & 0 deletions changelog/add-5316-payout-trace-id
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: add

Add Bank reference key column in Payout reports. This will help reconcile WooPayments Payouts with bank statements.
4 changes: 4 additions & 0 deletions changelog/add-9556-set-support-phone-mandatory
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Set the support phone field as mandatory in the settings page.
4 changes: 4 additions & 0 deletions changelog/as-fix-ece-tax-based-billing-address
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Ensure ECE is displayed correctly taking into account the tax settings.
5 changes: 5 additions & 0 deletions changelog/chore-ece-states-class-constants
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: chore: rename Payment_Request_Button_States to Express_Checkout_Element_States to reflect its usage


4 changes: 4 additions & 0 deletions changelog/chore-remove-redundant-init-for-payfororder
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Avoid getting the appearance for pay for order page with the wrong appearance key.
4 changes: 4 additions & 0 deletions changelog/dev-4293-address-additional-union-types
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Fix return types
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Ensure proper return types in the webhook processing service.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Allow redirect to the settings page from WCPay connect
5 changes: 5 additions & 0 deletions changelog/fix-7399
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Ensure dispute urls in order notes are urlencoded


4 changes: 4 additions & 0 deletions changelog/fix-9709-load-stripe-asynchronously
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Add support to load stripe js asynchronously when it is not immediately available in the global scope.
4 changes: 4 additions & 0 deletions changelog/fix-9784-ece-tracks-events
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fix ECE Tracks events not triggering when WooPay is disabled.
5 changes: 5 additions & 0 deletions changelog/fix-no-bnpl-subscriptions
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Small fix for BNPL messaging element.


4 changes: 4 additions & 0 deletions changelog/fix-pmme-appearance-blocks
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Use paragraph selector instead of label for pmme appearance
4 changes: 4 additions & 0 deletions changelog/fix-remove-shortcode-test-mode-badge-from-label
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

fix: remove "test mode" badge from shortcode checkout.
4 changes: 4 additions & 0 deletions changelog/fix-woopay-component-spacing
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fix WooPay component spacing.
4 changes: 4 additions & 0 deletions changelog/fix-woopay-trial-subscriptions
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fix WooPay trial subscriptions purchases.
5 changes: 5 additions & 0 deletions changelog/refactor-tokenized-ece-base-implementation
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: update
Comment: feat: tokenized cart ECE shortcode base implementation.


5 changes: 5 additions & 0 deletions changelog/update-phpcompatibility-latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Update phpcompatibility to develop version to get sniffs for PHP 8. No need to include it in the changelog since it is a dev task that doesn't impact WooPayments.


5 changes: 5 additions & 0 deletions changelog/update-server-container-name
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Updates server container name used by E2E tests


9 changes: 7 additions & 2 deletions client/cart/blocks/product-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { select } from '@wordpress/data';
* Internal dependencies
*/
import { getAppearance, getFontRulesFromPage } from 'wcpay/checkout/upe-styles';
import { useStripeAsync } from 'wcpay/hooks/use-stripe-async';
import { getUPEConfig } from 'utils/checkout';
import WCPayAPI from '../../checkout/api';
import request from '../../checkout/utils/request';
Expand Down Expand Up @@ -47,6 +48,8 @@ const ProductDetail = ( { cart, context } ) => {

const [ fontRules ] = useState( getFontRulesFromPage() );

const stripe = useStripeAsync( api );

useEffect( () => {
async function generateUPEAppearance() {
// Generate UPE input styles.
Expand All @@ -63,6 +66,10 @@ const ProductDetail = ( { cart, context } ) => {
}
}, [ appearance ] );

if ( ! stripe ) {
return null;
}

if ( Object.keys( appearance ).length === 0 ) {
return null;
}
Expand Down Expand Up @@ -91,8 +98,6 @@ const ProductDetail = ( { cart, context } ) => {
countryCode: country, // Customer's country or base country of the store.
};

const stripe = api.getStripe();

return (
<div className="wc-block-components-bnpl-wrapper">
<Elements
Expand Down
Loading

0 comments on commit 8667c9e

Please sign in to comment.