Skip to content

Commit

Permalink
Merge release/8.7.0 into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
tpaksu committed Dec 25, 2024
2 parents 09ff372 + 7551fb2 commit 0263854
Show file tree
Hide file tree
Showing 271 changed files with 6,281 additions and 5,602 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: 1 addition & 2 deletions .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: PHP Compatibility

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

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
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/
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
61 changes: 61 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,66 @@
*** WooPayments Changelog ***

= 8.7.0 - 2024-12-25 =
* Add - Add seller_message to failed order notes
* Add - Add WooPay Klaviyo newsletter integration.
* Add - Clickwrap terms and conditions support on WooPay
* Add - Implement gateway method to retrieve recommended payment method.
* Add - Migrate active capabilities from test-drive account when switching to live account.
* Add - Refresh the cart and checkout pages when ECE is dismissed and the shipping options were modified in the payment sheet.
* Fix - Add a rounding entry to Level 3 data for rare cases where rounding errors break calculations.
* Fix - Added conditional use of Jetpack Config callback to avoid i18n notices.
* Fix - Browser error no longer shows after dispute evidence submission
* Fix - Ceil product prices after applying currency conversion, but before charm pricing and price rounding from settings is applied.
* Fix - Consider WooPay eligibility when retrieving WooPay enable state in the settings.
* Fix - Enable ECE for Virtual Variable Subscriptions with Free Trials.
* Fix - Ensure captured transactions appear in the Transactions tab without requiring a page refresh.
* Fix - Ensure ECE login confirmation dialog is shown on Blocks.
* Fix - Ensure WooPay 'enabled by default' value is correctly set in sandbox mode.
* Fix - Errors were incorrectly marked as info in logs.
* Fix - fix: undefined $cart_contains_subscription
* Fix - Fix blank Payments > Overview page when WC onboarding is disabled.
* Fix - Fixed Affirm using black logo on dark themes
* Fix - Fixed an issue where order metadata was not updated when capturing an order in the processing state.
* Fix - Fixed UPE country detection in Checkout for non-logged in users
* Fix - Fix filtering in async Disputes CSV export
* Fix - Fix inconsistent alignment of the download button across transactions, payouts, and disputes reporting views for a more cohesive user interface.
* Fix - Fix Jetpack onboarding URL query from "woocommerce-payments" to "woocommerce-core-profiler"
* Fix - Fix payment method filtering when billing country changes in Blocks checkout.
* Fix - Fix styling of transaction details page in mobile view.
* Fix - Hide transaction fee on admin view order screen when transaction is not captured.
* Fix - Load checkout scripts when they are not previously loaded on checkout page.
* Fix - Localize postal code check label based on country.
* Fix - Normalize HK addresses for ECE
* Fix - Order notes for inquiries have clearer content.
* Fix - Performance improvements for Disputes Needing Response task shown in WooCommerce admin.
* Fix - Remove translations during initialization, preventing unnecessary warnings.
* Fix - Restrict Stripe Link to credit card payment method and improve cleanup.
* Fix - Set payment method title once title is known.
* Fix - Show express checkout for products w/o shipping but where tax is included into price.
* Fix - Support 'type_is_in' filter for Transactions list report, to allow easy filtering by multiple types.
* Fix - Use "currency conversion fee" instead "foreign exchange fee" in payment timeline and various other places.
* Fix - Use translatable strings on the fee breakdown tooltip of the payment settings screen.
* Update - Add failure reason to failed payments in the timeline.
* Update - Add support for showing `In-Person (POS)` as the transaction channel for mobile POS transactions in wp-admin Payments, enhancing visibility in both transaction lists and details.
* Update - Adjust the go-live modal to match the latest design.
* Update - Apply User-Defined Date Formatting Settings to WP Admin React Components
* Update - Change 'Bank reference key' label to 'Bank reference ID' in Payouts list column for consistency.
* Update - chore: renamed PRB references in GooglePay/ApplePay implementation docs and logs files to ECE.
* Update - Ensure more robust selectors scoping to improve theme compatibility.
* Update - Make test instructions copy icon use the same color as the text next to it
* Update - Remove payout timing notice and update the help tooltil on Payments Overview page.
* Update - Update confirmation modal after onbarding
* Update - Update Embedded Components and MOX to support custom width and paddings.
* Update - Update error messages for payment authorization actions to provide more specific and user-friendly feedback.
* Update - Update Jetpack onboarding flow
* Update - WooPay theming copy in the settings page
* Dev - Add support for utilizing NOX capabilities as URL parameters during account creation.
* Dev - Enable Payment Methods preselected by NOX after onboarding accounts
* Dev - Fixing issue with parsing QIT authentication.Fixing issue with parsing QIT authentication.
* Dev - Refine verification for disabling ECE on subscriptions that require shipping.
* Dev - Remove hooks from customer and token services to dedicated methods
* Dev - Update the tunelling setup.

= 8.6.1 - 2024-12-17 =
* Fix - Checkout: Fix error when wc_address_i18n_params does not have data for a given country
* Fix - Skip mysqlcheck SSL Requirement during E2E environment setup
Expand Down
12 changes: 8 additions & 4 deletions client/capital/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import * as React from 'react';
import { __, _n } from '@wordpress/i18n';
import { TableCard } from '@woocommerce/components';
import { dateI18n } from '@wordpress/date';

/**
* Internal dependencies.
Expand All @@ -25,6 +24,8 @@ import Chip from 'components/chip';
import { useLoans } from 'wcpay/data';
import { getAdminUrl } from 'wcpay/utils';
import './style.scss';
import { formatDateTimeFromString } from 'wcpay/utils/date-time';
import DateFormatNotice from 'wcpay/components/date-format-notice';

const columns = [
{
Expand Down Expand Up @@ -80,7 +81,7 @@ const getLoanStatusText = ( loan: CapitalLoan ) => {
return loan.fully_paid_at
? __( 'Paid off', 'woocommerce-payments' ) +
': ' +
dateI18n( 'M j, Y', loan.fully_paid_at )
formatDateTimeFromString( loan.fully_paid_at )
: __( 'Active', 'woocommerce-payments' );
};

Expand Down Expand Up @@ -112,7 +113,9 @@ const getRowsData = ( loans: CapitalLoan[] ) =>
const data = {
paid_out_at: {
value: loan.paid_out_at,
display: clickable( dateI18n( 'M j, Y', loan.paid_out_at ) ),
display: clickable(
formatDateTimeFromString( loan.paid_out_at )
),
},
status: {
value: getLoanStatusText( loan ),
Expand Down Expand Up @@ -150,7 +153,7 @@ const getRowsData = ( loans: CapitalLoan[] ) =>
value: loan.first_paydown_at,
display: clickable(
loan.first_paydown_at
? dateI18n( 'M j, Y', loan.first_paydown_at )
? formatDateTimeFromString( loan.first_paydown_at )
: '-'
),
},
Expand Down Expand Up @@ -207,6 +210,7 @@ const CapitalPage = (): JSX.Element => {

return (
<Page>
<DateFormatNotice />
<TestModeNotice currentPage="loans" />

{ wcpaySettings.accountLoans.has_active_loan && (
Expand Down
48 changes: 48 additions & 0 deletions client/capital/test/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,54 @@ exports[`CapitalPage renders the TableCard component with loan data 1`] = `
<div
class=" woocommerce-payments-page"
>
<div
class="date-format-notice wcpay-banner-notice is-info"
>
<svg
aria-hidden="true"
class="wcpay-banner-notice__icon"
focusable="false"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"
/>
</svg>
<div
class="wcpay-banner-notice__content"
>
The date and time formats now match your preferences. You can update them anytime in the
<a
data-link-type="external"
href="/wp-admin/options-general.php"
>
settings
</a>
.
</div>
<button
aria-label="Dismiss this notice"
class="components-button wcpay-banner-notice__dismiss has-icon"
type="button"
>
<svg
class="gridicon gridicons-cross-small"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<g>
<path
d="M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"
/>
</g>
</svg>
</button>
</div>
<div
class="wcpay-banner-notice is-warning"
>
Expand Down
2 changes: 2 additions & 0 deletions client/capital/test/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ declare const global: {
accountLoans: {
has_active_loan: boolean;
};
dateFormat: string;
};
};

Expand All @@ -37,6 +38,7 @@ describe( 'CapitalPage', () => {
},
accountLoans: { has_active_loan: true },
testMode: true,
dateFormat: 'M j, Y',
};
} );

Expand Down
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
2 changes: 0 additions & 2 deletions client/checkout/blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const upeMethods = {
};

const enabledPaymentMethodsConfig = getUPEConfig( 'paymentMethodsConfig' );
const upeAppearanceTheme = getUPEConfig( 'wcBlocksUPEAppearanceTheme' );
const isStripeLinkEnabled = isLinkEnabled( enabledPaymentMethodsConfig );

// Create an API object, which will be used throughout the checkout.
Expand Down Expand Up @@ -116,7 +115,6 @@ Object.entries( enabledPaymentMethodsConfig )
iconLight={ upeConfig.icon }
iconDark={ upeConfig.darkIcon }
upeName={ upeName }
upeAppearanceTheme={ upeAppearanceTheme }
/>
),
ariaLabel: 'WooPayments',
Expand Down
14 changes: 5 additions & 9 deletions client/checkout/blocks/payment-method-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,15 @@ const PaymentMethodMessageWrapper = ( {
);
};

export default ( {
api,
title,
countries,
iconLight,
iconDark,
upeName,
upeAppearanceTheme,
} ) => {
export default ( { api, title, countries, iconLight, iconDark, upeName } ) => {
const cartData = wp.data.select( 'wc/store/cart' ).getCartData();
const isTestMode = getUPEConfig( 'testMode' );
const [ appearance, setAppearance ] = useState(
getUPEConfig( 'wcBlocksUPEAppearance' )
);
const [ upeAppearanceTheme, setUpeAppearanceTheme ] = useState(
getUPEConfig( 'wcBlocksUPEAppearanceTheme' )
);

// Stripe expects the amount to be sent as the minor unit of 2 digits.
const amount = parseInt(
Expand All @@ -86,6 +81,7 @@ export default ( {
'blocks_checkout'
);
setAppearance( upeAppearance );
setUpeAppearanceTheme( upeAppearance.theme );
}

if ( ! appearance ) {
Expand Down
Loading

0 comments on commit 0263854

Please sign in to comment.