Skip to content

Commit

Permalink
Merge branch 'develop' into fix/9736-remove-temporary-payment-activit…
Browse files Browse the repository at this point in the history
…y-transaction-search-css
  • Loading branch information
Jinksi authored Dec 15, 2024
2 parents 731d939 + cb65e92 commit 30b0d6c
Show file tree
Hide file tree
Showing 106 changed files with 1,421 additions and 4,104 deletions.
4 changes: 0 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@ 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,6 @@ tests/e2e-pw/playwright/.cache/
tests/e2e-pw/tests/e2e-pw/.auth/*
# Slate docs
docs/rest-api/build/*

# Jurassic Tube files
bin/jurassictube/
4 changes: 2 additions & 2 deletions bin/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ cli()
set +e
# Wait for containers to be started up before the setup.
# The db being accessible means that the db container started and the WP has been downloaded and the plugin linked
cli wp db check --path=/var/www/html --quiet > /dev/null
cli wp db check --skip_ssl --path=/var/www/html --quiet > /dev/null
while [[ $? -ne 0 ]]; do
echo "Waiting until the service is ready..."
sleep 5
cli wp db check --path=/var/www/html --quiet > /dev/null
cli wp db check --skip_ssl --path=/var/www/html --quiet > /dev/null
done

# If the plugin is already active then return early
Expand Down
43 changes: 31 additions & 12 deletions bin/jurassic-tube-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,32 @@
# Exit if any command fails.
set -e

echo "Checking if ${PWD}/docker/bin/jt directory exists..."
# Define Jurassic Tube directory using bin directory
JT_DIR="${PWD}/bin/jurassictube"

if [ -d "${PWD}/docker/bin/jt" ]; then
echo "${PWD}/docker/bin/jt already exists."
echo "Checking if ${JT_DIR} directory exists..."

if [ -d "${JT_DIR}" ]; then
echo "${JT_DIR} already exists."
else
echo "Creating ${PWD}/docker/bin/jt directory..."
mkdir -p "${PWD}/docker/bin/jt"
echo "Creating ${JT_DIR} directory..."
mkdir -p "${JT_DIR}"
fi

echo "Downloading the latest version of the installer script..."
echo "Checking if the installer is present and downloading it if not..."
echo

# Download the installer (if it's not already present):
if [ ! -f "${PWD}/docker/bin/jt/installer.sh" ]; then
# Download the installer script:
curl "https://jurassic.tube/get-installer.php?env=wcpay" -o ${PWD}/docker/bin/jt/installer.sh && chmod +x ${PWD}/docker/bin/jt/installer.sh
if [ ! -f "${JT_DIR}/installer.sh" ]; then
echo "Downloading the standalone installer..."
curl "https://jurassic.tube/installer-standalone.sh" -o "${JT_DIR}/installer.sh" && chmod +x "${JT_DIR}/installer.sh"
fi

echo "Running the installation script..."
echo

# Run the installer script
source $PWD/docker/bin/jt/installer.sh
"${JT_DIR}/installer.sh"

echo
read -p "Go to https://jurassic.tube/ in a browser, paste your public key which was printed above into the box, and click 'Add Public Key'. Press enter to continue"
Expand All @@ -40,8 +43,24 @@ echo
read -p "Please enter your Automattic/WordPress.com username: " username
echo

${PWD}/docker/bin/jt/config.sh username ${username}
${PWD}/docker/bin/jt/config.sh subdomain ${subdomain}
if [ ! -f "${JT_DIR}/config.env" ]; then
touch "${JT_DIR}/config.env"
else
> "${JT_DIR}/config.env"
fi

# Find the WordPress container section and get its port
PORT=$(docker ps | grep woocommerce_payments_wordpress | sed -En "s/.*0:([0-9]+).*/\1/p")

# Use default if extraction failed
if [ -z "$PORT" ]; then
PORT=8082 # Default fallback
echo "Could not extract WordPress container port, using default: ${PORT}"
fi

echo "username=${username}" >> "${JT_DIR}/config.env"
echo "subdomain=${subdomain}" >> "${JT_DIR}/config.env"
echo "localhost=localhost:${PORT}" >> "${JT_DIR}/config.env"

echo "Setup complete!"
echo "Use the command: npm run tube:start from the root directory of your WC Payments project to start running Jurassic Tube."
Expand Down
4 changes: 4 additions & 0 deletions changelog/add-6924-migrate-test-drive-capabilities
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: add

Migrate active capabilities from test-drive account when switching to live account.
4 changes: 4 additions & 0 deletions changelog/add-jetpack-config-callback
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Added conditional use of Jetpack Config callback to avoid i18n notices.
5 changes: 5 additions & 0 deletions changelog/add-pass-footer-header-styles-to-woopay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: add
Comment: Impovements to WooPay themeing, which is not yet released to the public.


4 changes: 4 additions & 0 deletions changelog/as-fix-ece-variable-subs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: dev

Refine verification for disabling ECE on subscriptions that require shipping.
4 changes: 4 additions & 0 deletions changelog/as-fix-ece-variable-subs-free-trial
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Enable ECE for Virtual Variable Subscriptions with Free Trials.
5 changes: 5 additions & 0 deletions changelog/chore-remove-ece-error-assignment-on-loaderror
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: update
Comment: chore: remove ECE error assignment on loaderror


5 changes: 5 additions & 0 deletions changelog/chore-remove-tokenized-payment-request-references
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: chore: remove tokeinzed payment request code


4 changes: 4 additions & 0 deletions changelog/compat-9727-avoid-early-translations
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Remove translations during initialization, preventing unnecessary warnings.
5 changes: 5 additions & 0 deletions changelog/feat-tokenized-ece-product-page-base-implementation
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: update
Comment: feat: tokenized ECE product page base implementation


Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fixed an issue where order metadata was not updated when capturing an order in the processing state.
4 changes: 4 additions & 0 deletions changelog/fix-9421-auto-enable-woopay-in-sandbox-mode
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Ensure WooPay 'enabled by default' value is correctly set in sandbox mode.
4 changes: 4 additions & 0 deletions changelog/fix-9806-ECE-subscription-checkout-signed-out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Ensure ECE login confirmation dialog is shown on Blocks.
4 changes: 4 additions & 0 deletions changelog/fix-9889-log-level
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Errors were incorrectly marked as info in logs.
5 changes: 5 additions & 0 deletions changelog/fix-add-payment-method-check
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Added a check for the gateway id before comparing it


4 changes: 4 additions & 0 deletions changelog/fix-skip-ssl-requirement-env-setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Skip mysqlcheck SSL Requirement during E2E environment setup
5 changes: 5 additions & 0 deletions changelog/fix-tokenized-cart-error-notice-json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: fix: tokenized cart error notice json


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

Fixed UPE country detection in Checkout for non-logged in users
5 changes: 5 additions & 0 deletions changelog/fix-use-effect-console-warning
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: fix: console warning on plugins page


4 changes: 4 additions & 0 deletions changelog/replace-from-url-query
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Fix Jetpack onboarding URL query from "woocommerce-payments" to "woocommerce-core-profiler"
4 changes: 4 additions & 0 deletions changelog/update-1-5316-rename-bank-reference-id
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Change 'Bank reference key' label to 'Bank reference ID' in Payouts list column for consistency.
5 changes: 5 additions & 0 deletions changelog/update-9910-transaction-id-label
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Change ID to uppercase in the 'Transaction ID' column label for consistency with similar unique IDs in the UI.


4 changes: 4 additions & 0 deletions changelog/update-9916-go-live-modal-and-notice
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Adjust the go-live modal to match the latest design.
4 changes: 4 additions & 0 deletions changelog/update-confirmation-modal-nox
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Update confirmation modal after onbarding
4 changes: 4 additions & 0 deletions changelog/update-jetpack-onboarding-flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Update Jetpack onboarding flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: dev

Add support for utilizing NOX capabilities as URL parameters during account creation.
4 changes: 4 additions & 0 deletions changelog/update-to-standalone-jt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: dev

Update the tunelling setup.
3 changes: 3 additions & 0 deletions client/checkout/api/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const mockAppearance = {
'.Button': {},
'.Link': {},
'.Container': {},
'.Footer': {},
'.Footer-link': {},
'.Header': {},
},
theme: 'stripe',
variables: {
Expand Down
12 changes: 12 additions & 0 deletions client/checkout/upe-styles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ export const appearanceSelectors = {
buttonSelectors: [ '#place_order' ],
linkSelectors: [ 'a' ],
containerSelectors: [ '.woocommerce-checkout-review-order-table' ],
headerSelectors: [ '.site-header' ],
footerSelectors: [ '.site-footer' ],
footerLink: [ '.site-footer a' ],
},

/**
Expand Down Expand Up @@ -514,6 +517,12 @@ export const getAppearance = ( elementsLocation, forWooPay = false ) => {
selectors.containerSelectors,
'.Container'
);
const headerRules = getFieldStyles( selectors.headerSelectors, '.Header' );
const footerRules = getFieldStyles( selectors.footerSelectors, '.Footer' );
const footerLinkRules = getFieldStyles(
selectors.footerLink,
'.Footer--link'
);
const globalRules = {
colorBackground: backgroundColor,
colorText: paragraphRules.color,
Expand Down Expand Up @@ -559,6 +568,9 @@ export const getAppearance = ( elementsLocation, forWooPay = false ) => {
appearance.rules = {
...appearance.rules,
'.Heading': headingRules,
'.Header': headerRules,
'.Footer': footerRules,
'.Footer-link': footerLinkRules,
'.Button': buttonRules,
'.Link': linkRules,
'.Container': containerRules,
Expand Down
23 changes: 23 additions & 0 deletions client/checkout/upe-styles/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,29 @@ describe( 'Getting styles for automated theming', () => {
'.Container': {
backgroundColor: 'rgba(0, 0, 0, 0)',
},
'.Footer': {
color: 'rgb(109, 109, 109)',
backgroundColor: 'rgba(0, 0, 0, 0)',
fontFamily:
'"Source Sans Pro", HelveticaNeue-Light, "Helvetica Neue Light"',
fontSize: '12px',
padding: '10px',
},
'.Footer-link': {
color: 'rgb(109, 109, 109)',
fontFamily:
'"Source Sans Pro", HelveticaNeue-Light, "Helvetica Neue Light"',
fontSize: '12px',
padding: '10px',
},
'.Header': {
color: 'rgb(109, 109, 109)',
backgroundColor: 'rgba(0, 0, 0, 0)',
fontFamily:
'"Source Sans Pro", HelveticaNeue-Light, "Helvetica Neue Light"',
fontSize: '12px',
padding: '10px',
},
},
labels: 'above',
} );
Expand Down
13 changes: 13 additions & 0 deletions client/checkout/upe-styles/upe-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ const upeSupportedProperties = {
...borderOutlineBackgroundProps.slice( 1 ), // Remove backgroundColor
],
'.Container': [ ...borderOutlineBackgroundProps ],
'.Header': [
...paddingColorProps,
...borderOutlineBackgroundProps,
...textFontTransitionProps,
],
'.Footer': [
...paddingColorProps,
...borderOutlineBackgroundProps,
...textFontTransitionProps,
],
};

// Restricted properties allowed to generate the automated theming of UPE.
Expand Down Expand Up @@ -113,6 +123,9 @@ export const upeRestrictedProperties = {
'.TabLabel': upeSupportedProperties[ '.TabLabel' ],
'.Block': upeSupportedProperties[ '.Block' ],
'.Container': upeSupportedProperties[ '.Container' ],
'.Header': upeSupportedProperties[ '.Header' ],
'.Footer': upeSupportedProperties[ '.Footer' ],
'.Footer--link': upeSupportedProperties[ '.Text' ],
'.Text': upeSupportedProperties[ '.Text' ],
'.Text--redirect': upeSupportedProperties[ '.Text' ],
};
3 changes: 1 addition & 2 deletions client/checkout/utils/upe.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,9 @@ export const togglePaymentMethodForCountry = ( upeElement ) => {
billingInput = document.querySelector( '#billing_country' );
}

/* global wcpayCustomerData */
// in the case of "pay for order", there is no "billing country" input, so we need to rely on backend data.
const billingCountry =
billingInput?.value || wcpayCustomerData?.billing_country || '';
billingInput?.value || window?.wcpayCustomerData?.billing_country || '';

const upeContainer = upeElement?.closest( '.wc_payment_method' );
if ( supportedCountries.includes( billingCountry ) ) {
Expand Down
10 changes: 8 additions & 2 deletions client/components/sandbox-mode-switch-to-live-notice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { recordEvent } from 'wcpay/tracks';
import { ClickTooltip } from 'wcpay/components/tooltip';
import ErrorBoundary from 'wcpay/components/error-boundary';
import SetupLivePaymentsModal from './modal';
import './style.scss';

interface Props {
from: string;
Expand All @@ -41,18 +42,23 @@ const SandboxModeSwitchToLiveNotice: React.FC< Props > = ( {

return (
<>
<BannerNotice status="warning" isDismissible={ false }>
<BannerNotice
status="warning"
className="sandbox-mode-notice"
isDismissible={ false }
>
{ interpolateComponents( {
mixedString: sprintf(
/* translators: %1$s: WooPayments */
__(
// eslint-disable-next-line max-len
'{{strong}}%1$s is in sandbox mode.{{/strong}} To accept real transactions, {{switchToLiveLink}}set up a live %1$s account.{{/switchToLiveLink}} {{learnMoreIcon/}}',
"{{div}}{{strong}}You're using a test account.{{/strong}} To accept payments from shoppers, {{switchToLiveLink}}activate your %1$s account.{{/switchToLiveLink}}{{/div}}{{learnMoreIcon/}}",
'woocommerce-payments'
),
'WooPayments'
),
components: {
div: <div />,
strong: <strong />,
learnMoreIcon: (
<ClickTooltip
Expand Down
Loading

0 comments on commit 30b0d6c

Please sign in to comment.