diff --git a/changelog.txt b/changelog.txt index cc6402cb77c..d6ecbad8a2c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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 diff --git a/changelog/8969-fallback-to-card-payment-type b/changelog/8969-fallback-to-card-payment-type deleted file mode 100644 index ee66dbfa7e7..00000000000 --- a/changelog/8969-fallback-to-card-payment-type +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: update -Comment: Small change to payment method types fallback scenario. - - diff --git a/changelog/add-2253-clickwrap-terms-and-conditions b/changelog/add-2253-clickwrap-terms-and-conditions deleted file mode 100644 index ac0a4ece4b7..00000000000 --- a/changelog/add-2253-clickwrap-terms-and-conditions +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Clickwrap terms and conditions support on WooPay diff --git a/changelog/add-6924-migrate-test-drive-capabilities b/changelog/add-6924-migrate-test-drive-capabilities deleted file mode 100644 index 7b280af4d92..00000000000 --- a/changelog/add-6924-migrate-test-drive-capabilities +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Migrate active capabilities from test-drive account when switching to live account. diff --git a/changelog/add-9690-recommended-pm b/changelog/add-9690-recommended-pm deleted file mode 100644 index 2d615350daa..00000000000 --- a/changelog/add-9690-recommended-pm +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Implement gateway method to retrieve recommended payment method. diff --git a/changelog/add-9973-enable-pms-from-capabilities b/changelog/add-9973-enable-pms-from-capabilities deleted file mode 100644 index 5ecfd2ac5cd..00000000000 --- a/changelog/add-9973-enable-pms-from-capabilities +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Enable Payment Methods preselected by NOX after onboarding accounts diff --git a/changelog/add-beta-badge-woopay-theme b/changelog/add-beta-badge-woopay-theme deleted file mode 100644 index 8d379077613..00000000000 --- a/changelog/add-beta-badge-woopay-theme +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: add -Comment: Adds a label to a gated feature. - - diff --git a/changelog/add-jetpack-config-callback b/changelog/add-jetpack-config-callback deleted file mode 100644 index 64b1a2abb1b..00000000000 --- a/changelog/add-jetpack-config-callback +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Added conditional use of Jetpack Config callback to avoid i18n notices. diff --git a/changelog/add-limit-woopay-themeing-to-shortcode-checkout b/changelog/add-limit-woopay-themeing-to-shortcode-checkout deleted file mode 100644 index 4c089593b1f..00000000000 --- a/changelog/add-limit-woopay-themeing-to-shortcode-checkout +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: add -Comment: Updates the availability criteria of WooPay Global theme-ing feature. This feature is unreleased and behind a feature flag. - - diff --git a/changelog/add-pass-footer-header-styles-to-woopay b/changelog/add-pass-footer-header-styles-to-woopay deleted file mode 100644 index ab6375db250..00000000000 --- a/changelog/add-pass-footer-header-styles-to-woopay +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: add -Comment: Impovements to WooPay themeing, which is not yet released to the public. - - diff --git a/changelog/add-woopay-klaviyo-newsletter-support b/changelog/add-woopay-klaviyo-newsletter-support deleted file mode 100644 index 64e94c6638e..00000000000 --- a/changelog/add-woopay-klaviyo-newsletter-support +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: add - -Add WooPay Klaviyo newsletter integration. diff --git a/changelog/as-fix-ece-variable-subs b/changelog/as-fix-ece-variable-subs deleted file mode 100644 index 236497bcab9..00000000000 --- a/changelog/as-fix-ece-variable-subs +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Refine verification for disabling ECE on subscriptions that require shipping. diff --git a/changelog/as-fix-ece-variable-subs-free-trial b/changelog/as-fix-ece-variable-subs-free-trial deleted file mode 100644 index 64d67393c06..00000000000 --- a/changelog/as-fix-ece-variable-subs-free-trial +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Enable ECE for Virtual Variable Subscriptions with Free Trials. diff --git a/changelog/as-hk-address b/changelog/as-hk-address deleted file mode 100644 index d58ddb9ffd9..00000000000 --- a/changelog/as-hk-address +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Normalize HK addresses for ECE diff --git a/changelog/chore-prb-references-in-ece-docs-and-logs b/changelog/chore-prb-references-in-ece-docs-and-logs deleted file mode 100644 index 887525ff7bc..00000000000 --- a/changelog/chore-prb-references-in-ece-docs-and-logs +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -chore: renamed PRB references in GooglePay/ApplePay implementation docs and logs files to ECE. diff --git a/changelog/chore-remove-ece-error-assignment-on-loaderror b/changelog/chore-remove-ece-error-assignment-on-loaderror deleted file mode 100644 index cce991d09ba..00000000000 --- a/changelog/chore-remove-ece-error-assignment-on-loaderror +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: update -Comment: chore: remove ECE error assignment on loaderror - - diff --git a/changelog/chore-remove-tokenized-payment-request-references b/changelog/chore-remove-tokenized-payment-request-references deleted file mode 100644 index 56dc3b0a0cc..00000000000 --- a/changelog/chore-remove-tokenized-payment-request-references +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: dev -Comment: chore: remove tokeinzed payment request code - - diff --git a/changelog/compat-9727-avoid-early-translations b/changelog/compat-9727-avoid-early-translations deleted file mode 100644 index 51432b8cd10..00000000000 --- a/changelog/compat-9727-avoid-early-translations +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Remove translations during initialization, preventing unnecessary warnings. diff --git a/changelog/dev-10029-export-deposit-type-assert b/changelog/dev-10029-export-deposit-type-assert new file mode 100644 index 00000000000..684727000a7 --- /dev/null +++ b/changelog/dev-10029-export-deposit-type-assert @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: Add type assertion for payouts CSV export response to ensure type safety and fix TypeScript linting error + + diff --git a/changelog/dev-10034-linter-warning-useeffect-unused-import b/changelog/dev-10034-linter-warning-useeffect-unused-import new file mode 100644 index 00000000000..4d2131a41b7 --- /dev/null +++ b/changelog/dev-10034-linter-warning-useeffect-unused-import @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: Not user-facing: removed an unused `useEffect` import causing linter warnings + + diff --git a/changelog/dev-7264-remove-hooks-from-customer-service-constructor b/changelog/dev-7264-remove-hooks-from-customer-service-constructor deleted file mode 100644 index d912717fc31..00000000000 --- a/changelog/dev-7264-remove-hooks-from-customer-service-constructor +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Remove hooks from customer and token services to dedicated methods diff --git a/changelog/dev-qit-auth-fix-take-2 b/changelog/dev-qit-auth-fix-take-2 deleted file mode 100644 index 67ec99abd79..00000000000 --- a/changelog/dev-qit-auth-fix-take-2 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Fixing issue with parsing QIT authentication.Fixing issue with parsing QIT authentication. diff --git a/changelog/feat-9810-add-seller-message b/changelog/feat-9810-add-seller-message deleted file mode 100644 index 2669c24015b..00000000000 --- a/changelog/feat-9810-add-seller-message +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add seller_message to failed order notes diff --git a/changelog/feat-tokenized-ece-product-page-base-implementation b/changelog/feat-tokenized-ece-product-page-base-implementation deleted file mode 100644 index e0f342c1623..00000000000 --- a/changelog/feat-tokenized-ece-product-page-base-implementation +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: update -Comment: feat: tokenized ECE product page base implementation - - diff --git a/changelog/feature-consistent-note-formatting b/changelog/feature-consistent-note-formatting new file mode 100644 index 00000000000..bb18d73c7ee --- /dev/null +++ b/changelog/feature-consistent-note-formatting @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +Ensure consistent formatting of refund notes with MC. diff --git a/changelog/fix-198-mccy-fedex-conversion b/changelog/fix-198-mccy-fedex-conversion deleted file mode 100644 index 7fecbc49b87..00000000000 --- a/changelog/fix-198-mccy-fedex-conversion +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: Fix FedEx insurance rates with different currencies. - - diff --git a/changelog/fix-5671-handle-error-on-refund-during-manual-capture b/changelog/fix-5671-handle-error-on-refund-during-manual-capture deleted file mode 100644 index 016c68f13aa..00000000000 --- a/changelog/fix-5671-handle-error-on-refund-during-manual-capture +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fixed an issue where order metadata was not updated when capturing an order in the processing state. diff --git a/changelog/fix-6567-user-set-date-and-time-formatting-arent-respected-in-react-components b/changelog/fix-6567-user-set-date-and-time-formatting-arent-respected-in-react-components deleted file mode 100644 index 5c69920cf26..00000000000 --- a/changelog/fix-6567-user-set-date-and-time-formatting-arent-respected-in-react-components +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Apply User-Defined Date Formatting Settings to WP Admin React Components diff --git a/changelog/fix-7230-payments-details-mobile-view b/changelog/fix-7230-payments-details-mobile-view deleted file mode 100644 index 93e179a44ca..00000000000 --- a/changelog/fix-7230-payments-details-mobile-view +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix styling of transaction details page in mobile view. diff --git a/changelog/fix-8620-fee-types-in-fees-brakedown-tooltip-are-not-internationalised b/changelog/fix-8620-fee-types-in-fees-brakedown-tooltip-are-not-internationalised deleted file mode 100644 index 57528510958..00000000000 --- a/changelog/fix-8620-fee-types-in-fees-brakedown-tooltip-are-not-internationalised +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Use translatable strings on the fee breakdown tooltip of the payment settings screen. diff --git a/changelog/fix-9114-level3-rounding b/changelog/fix-9114-level3-rounding deleted file mode 100644 index 713c8d684cc..00000000000 --- a/changelog/fix-9114-level3-rounding +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Add a rounding entry to Level 3 data for rare cases where rounding errors break calculations. diff --git a/changelog/fix-9418-hide-transaction-fees-when-transaction-is-not-captured b/changelog/fix-9418-hide-transaction-fees-when-transaction-is-not-captured deleted file mode 100644 index f524fd812f1..00000000000 --- a/changelog/fix-9418-hide-transaction-fees-when-transaction-is-not-captured +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Hide transaction fee on admin view order screen when transaction is not captured. diff --git a/changelog/fix-9421-auto-enable-woopay-in-sandbox-mode b/changelog/fix-9421-auto-enable-woopay-in-sandbox-mode deleted file mode 100644 index 30ec0c7fed5..00000000000 --- a/changelog/fix-9421-auto-enable-woopay-in-sandbox-mode +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Ensure WooPay 'enabled by default' value is correctly set in sandbox mode. diff --git a/changelog/fix-9612-inquiry-order-note b/changelog/fix-9612-inquiry-order-note deleted file mode 100644 index 3fce0a23430..00000000000 --- a/changelog/fix-9612-inquiry-order-note +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Order notes for inquiries have clearer content. diff --git a/changelog/fix-9716-disputes-api-requests b/changelog/fix-9716-disputes-api-requests deleted file mode 100644 index 10f5387c9b4..00000000000 --- a/changelog/fix-9716-disputes-api-requests +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Performance improvements for Disputes Needing Response task shown in WooCommerce admin. diff --git a/changelog/fix-9735-render-transactions-correctly-on-capture b/changelog/fix-9735-render-transactions-correctly-on-capture deleted file mode 100644 index 9ed7f628e4c..00000000000 --- a/changelog/fix-9735-render-transactions-correctly-on-capture +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Ensure captured transactions appear in the Transactions tab without requiring a page refresh. diff --git a/changelog/fix-9736-remove-temporary-payment-activity-transaction-search-css b/changelog/fix-9736-remove-temporary-payment-activity-transaction-search-css deleted file mode 100644 index 3841ea6164e..00000000000 --- a/changelog/fix-9736-remove-temporary-payment-activity-transaction-search-css +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix inconsistent alignment of the download button across transactions, payouts, and disputes reporting views for a more cohesive user interface. diff --git a/changelog/fix-9742-blank-overview-page-without-wc-features b/changelog/fix-9742-blank-overview-page-without-wc-features deleted file mode 100644 index 8d473bd8ab4..00000000000 --- a/changelog/fix-9742-blank-overview-page-without-wc-features +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix blank Payments > Overview page when WC onboarding is disabled. diff --git a/changelog/fix-9787-woopay-enable-state-settings b/changelog/fix-9787-woopay-enable-state-settings deleted file mode 100644 index cee183680df..00000000000 --- a/changelog/fix-9787-woopay-enable-state-settings +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Consider WooPay eligibility when retrieving WooPay enable state in the settings. diff --git a/changelog/fix-9794-refresh-page-when-ece-dismissed b/changelog/fix-9794-refresh-page-when-ece-dismissed deleted file mode 100644 index 7ec81b4760e..00000000000 --- a/changelog/fix-9794-refresh-page-when-ece-dismissed +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: add - -Refresh the cart and checkout pages when ECE is dismissed and the shipping options were modified in the payment sheet. diff --git a/changelog/fix-9806-ECE-subscription-checkout-signed-out b/changelog/fix-9806-ECE-subscription-checkout-signed-out deleted file mode 100644 index fa25afd1f10..00000000000 --- a/changelog/fix-9806-ECE-subscription-checkout-signed-out +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Ensure ECE login confirmation dialog is shown on Blocks. diff --git a/changelog/fix-9830-browser-error-on-dispute-submission b/changelog/fix-9830-browser-error-on-dispute-submission deleted file mode 100644 index 918ad744351..00000000000 --- a/changelog/fix-9830-browser-error-on-dispute-submission +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Browser error no longer shows after dispute evidence submission diff --git a/changelog/fix-9889-log-level b/changelog/fix-9889-log-level deleted file mode 100644 index d2f54e24c1a..00000000000 --- a/changelog/fix-9889-log-level +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Errors were incorrectly marked as info in logs. diff --git a/changelog/fix-9896-postal-code-label b/changelog/fix-9896-postal-code-label deleted file mode 100644 index dad971912a8..00000000000 --- a/changelog/fix-9896-postal-code-label +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Localize postal code check label based on country. diff --git a/changelog/fix-9987-filter-csv-disputes b/changelog/fix-9987-filter-csv-disputes deleted file mode 100644 index e4a87b24b1b..00000000000 --- a/changelog/fix-9987-filter-csv-disputes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix filtering in async Disputes CSV export diff --git a/changelog/fix-9996-currency-conversion-fee-phrasing b/changelog/fix-9996-currency-conversion-fee-phrasing deleted file mode 100644 index bdee2cbc00f..00000000000 --- a/changelog/fix-9996-currency-conversion-fee-phrasing +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Use "currency conversion fee" instead "foreign exchange fee" in payment timeline and various other places. diff --git a/changelog/fix-add-payment-method-check b/changelog/fix-add-payment-method-check deleted file mode 100644 index 4ffc9e6342f..00000000000 --- a/changelog/fix-add-payment-method-check +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: dev -Comment: Added a check for the gateway id before comparing it - - diff --git a/changelog/fix-allow-addresses-from-woo-supported-countries b/changelog/fix-allow-addresses-from-woo-supported-countries deleted file mode 100644 index 626fd1ce34f..00000000000 --- a/changelog/fix-allow-addresses-from-woo-supported-countries +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Checkout: Fix error when wc_address_i18n_params does not have data for a given country diff --git a/changelog/fix-change-woopay-theming-settings-copy b/changelog/fix-change-woopay-theming-settings-copy deleted file mode 100644 index fa73b3672f8..00000000000 --- a/changelog/fix-change-woopay-theming-settings-copy +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -WooPay theming copy in the settings page diff --git a/changelog/fix-ece-button-for-price-including-tax b/changelog/fix-ece-button-for-price-including-tax deleted file mode 100644 index 521ceb2af68..00000000000 --- a/changelog/fix-ece-button-for-price-including-tax +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Show express checkout for products w/o shipping but where tax is included into price. diff --git a/changelog/fix-method-title-availability b/changelog/fix-method-title-availability deleted file mode 100644 index d9d2a0c0217..00000000000 --- a/changelog/fix-method-title-availability +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Set payment method title once title is known. diff --git a/changelog/fix-php-8-compatibility-errors-warnings b/changelog/fix-php-8-compatibility-errors-warnings deleted file mode 100644 index 9c393f71654..00000000000 --- a/changelog/fix-php-8-compatibility-errors-warnings +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: dev -Comment: These changes fix some PHP compatibility errors that don't impact WooPayments behaviour. - - diff --git a/changelog/fix-rounding-error-with-deposit-products b/changelog/fix-rounding-error-with-deposit-products deleted file mode 100644 index d42215e3919..00000000000 --- a/changelog/fix-rounding-error-with-deposit-products +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Ceil product prices after applying currency conversion, but before charm pricing and price rounding from settings is applied. diff --git a/changelog/fix-skip-ssl-requirement-env-setup b/changelog/fix-skip-ssl-requirement-env-setup deleted file mode 100644 index 691f98adbfa..00000000000 --- a/changelog/fix-skip-ssl-requirement-env-setup +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Skip mysqlcheck SSL Requirement during E2E environment setup diff --git a/changelog/fix-stripe-link-button b/changelog/fix-stripe-link-button deleted file mode 100644 index d8acf0626f1..00000000000 --- a/changelog/fix-stripe-link-button +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Restrict Stripe Link to credit card payment method and improve cleanup. diff --git a/changelog/fix-tokenized-cart-error-notice-json b/changelog/fix-tokenized-cart-error-notice-json deleted file mode 100644 index c132e0f7eeb..00000000000 --- a/changelog/fix-tokenized-cart-error-notice-json +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: fix: tokenized cart error notice json - - diff --git a/changelog/fix-tokenized-cart-multiple-variations b/changelog/fix-tokenized-cart-multiple-variations deleted file mode 100644 index 5d155cd5513..00000000000 --- a/changelog/fix-tokenized-cart-multiple-variations +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: fix: tokenized cart & multiple variations. - - diff --git a/changelog/fix-tokenized-cart-subscription-signup-fee b/changelog/fix-tokenized-cart-subscription-signup-fee deleted file mode 100644 index 5abe9f0226b..00000000000 --- a/changelog/fix-tokenized-cart-subscription-signup-fee +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: fix: tokenized cart subscription signup fee price - - diff --git a/changelog/fix-tokenized-ece-pay-for-order-without-billing-email b/changelog/fix-tokenized-ece-pay-for-order-without-billing-email deleted file mode 100644 index 6e34989b976..00000000000 --- a/changelog/fix-tokenized-ece-pay-for-order-without-billing-email +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: fix: tokenized ECE do not show button when missing billing email - - diff --git a/changelog/fix-tokenized-ece-product-bundles-totals b/changelog/fix-tokenized-ece-product-bundles-totals deleted file mode 100644 index c003feec46a..00000000000 --- a/changelog/fix-tokenized-ece-product-bundles-totals +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: fix: tokenized ECE item compatibility w/ product bundles - - diff --git a/changelog/fix-unhandled-promises b/changelog/fix-unhandled-promises deleted file mode 100644 index a4d1a679405..00000000000 --- a/changelog/fix-unhandled-promises +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Fix payment method filtering when billing country changes in Blocks checkout. diff --git a/changelog/fix-upe-country-selection b/changelog/fix-upe-country-selection deleted file mode 100644 index 478ffa1cfcd..00000000000 --- a/changelog/fix-upe-country-selection +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fixed UPE country detection in Checkout for non-logged in users diff --git a/changelog/fix-upe-theme-block b/changelog/fix-upe-theme-block deleted file mode 100644 index 6afa59f04d3..00000000000 --- a/changelog/fix-upe-theme-block +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fixed Affirm using black logo on dark themes diff --git a/changelog/fix-use-effect-console-warning b/changelog/fix-use-effect-console-warning deleted file mode 100644 index 45219e7b39a..00000000000 --- a/changelog/fix-use-effect-console-warning +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: dev -Comment: fix: console warning on plugins page - - diff --git a/changelog/fix-use-type-is-in-filter b/changelog/fix-use-type-is-in-filter deleted file mode 100644 index 3639b203c36..00000000000 --- a/changelog/fix-use-type-is-in-filter +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Support 'type_is_in' filter for Transactions list report, to allow easy filtering by multiple types. diff --git a/changelog/frosso-patch-1 b/changelog/frosso-patch-1 deleted file mode 100644 index e3812625698..00000000000 --- a/changelog/frosso-patch-1 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -fix: undefined $cart_contains_subscription diff --git a/changelog/load-checkout-scripts-on-checkout-if-not-loaded b/changelog/load-checkout-scripts-on-checkout-if-not-loaded deleted file mode 100644 index 4a684203a2e..00000000000 --- a/changelog/load-checkout-scripts-on-checkout-if-not-loaded +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Load checkout scripts when they are not previously loaded on checkout page. diff --git a/changelog/mobile-tpv-tracking-channel b/changelog/mobile-tpv-tracking-channel deleted file mode 100644 index a7b990214df..00000000000 --- a/changelog/mobile-tpv-tracking-channel +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: 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. diff --git a/changelog/replace-from-url-query b/changelog/replace-from-url-query deleted file mode 100644 index 58688e1c42f..00000000000 --- a/changelog/replace-from-url-query +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Fix Jetpack onboarding URL query from "woocommerce-payments" to "woocommerce-core-profiler" diff --git a/changelog/scope-payment-elements-selectors b/changelog/scope-payment-elements-selectors deleted file mode 100644 index 515bb60dc2e..00000000000 --- a/changelog/scope-payment-elements-selectors +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Ensure more robust selectors scoping to improve theme compatibility. diff --git a/changelog/test-instructions-item-color b/changelog/test-instructions-item-color deleted file mode 100644 index 4bf5983e8e6..00000000000 --- a/changelog/test-instructions-item-color +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Make test instructions copy icon use the same color as the text next to it diff --git a/changelog/update-1-5316-rename-bank-reference-id b/changelog/update-1-5316-rename-bank-reference-id deleted file mode 100644 index 0a2841c0ad9..00000000000 --- a/changelog/update-1-5316-rename-bank-reference-id +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Change 'Bank reference key' label to 'Bank reference ID' in Payouts list column for consistency. diff --git a/changelog/update-5002-authorizations-improve-message-shown-to-merchants-when-there-is-an-error-capturing-authorizations b/changelog/update-5002-authorizations-improve-message-shown-to-merchants-when-there-is-an-error-capturing-authorizations deleted file mode 100644 index b76d70e1cf9..00000000000 --- a/changelog/update-5002-authorizations-improve-message-shown-to-merchants-when-there-is-an-error-capturing-authorizations +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Update error messages for payment authorization actions to provide more specific and user-friendly feedback. diff --git a/changelog/update-5713-failed-orders-should-include-more-info-on-transaction-details-page b/changelog/update-5713-failed-orders-should-include-more-info-on-transaction-details-page deleted file mode 100644 index daf90a1cd39..00000000000 --- a/changelog/update-5713-failed-orders-should-include-more-info-on-transaction-details-page +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Add failure reason to failed payments in the timeline. diff --git a/changelog/update-7900-payout-notice b/changelog/update-7900-payout-notice deleted file mode 100644 index 4a49df73e41..00000000000 --- a/changelog/update-7900-payout-notice +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Remove payout timing notice and update the help tooltil on Payments Overview page. diff --git a/changelog/update-9910-transaction-id-label b/changelog/update-9910-transaction-id-label deleted file mode 100644 index 0e43652d02b..00000000000 --- a/changelog/update-9910-transaction-id-label +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: Change ID to uppercase in the 'Transaction ID' column label for consistency with similar unique IDs in the UI. - - diff --git a/changelog/update-9916-go-live-modal-and-notice b/changelog/update-9916-go-live-modal-and-notice deleted file mode 100644 index 789b36753a9..00000000000 --- a/changelog/update-9916-go-live-modal-and-notice +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Adjust the go-live modal to match the latest design. diff --git a/changelog/update-9919-embedded-components-width b/changelog/update-9919-embedded-components-width deleted file mode 100644 index ca8fe89ebb7..00000000000 --- a/changelog/update-9919-embedded-components-width +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Update Embedded Components and MOX to support custom width and paddings. diff --git a/changelog/update-confirmation-modal-nox b/changelog/update-confirmation-modal-nox deleted file mode 100644 index 0ffd1af6127..00000000000 --- a/changelog/update-confirmation-modal-nox +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Update confirmation modal after onbarding diff --git a/changelog/update-jetpack-onboarding-flow b/changelog/update-jetpack-onboarding-flow deleted file mode 100644 index a28c6ac383c..00000000000 --- a/changelog/update-jetpack-onboarding-flow +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Update Jetpack onboarding flow diff --git a/changelog/update-pass-capabilities-to-onboarding-as-get-params b/changelog/update-pass-capabilities-to-onboarding-as-get-params deleted file mode 100644 index 9104e7a8f99..00000000000 --- a/changelog/update-pass-capabilities-to-onboarding-as-get-params +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Add support for utilizing NOX capabilities as URL parameters during account creation. diff --git a/changelog/update-s6837-reduce-api-impact-for-test-drive-setup b/changelog/update-s6837-reduce-api-impact-for-test-drive-setup deleted file mode 100644 index eaa0360fe7a..00000000000 --- a/changelog/update-s6837-reduce-api-impact-for-test-drive-setup +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: update -Comment: Reduce the maximum number of API calls during the test-drive process and add maximum duration cut off logic. - - diff --git a/changelog/update-to-standalone-jt b/changelog/update-to-standalone-jt deleted file mode 100644 index 4df87f235ec..00000000000 --- a/changelog/update-to-standalone-jt +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Update the tunelling setup. diff --git a/client/deposits/list/index.tsx b/client/deposits/list/index.tsx index dc3e20ac02a..52194cb184f 100644 --- a/client/deposits/list/index.tsx +++ b/client/deposits/list/index.tsx @@ -260,22 +260,25 @@ export const DepositsList = (): JSX.Element => { window.confirm( confirmMessage ) ) { try { - const { exported_deposits: exportedDeposits } = await apiFetch( - { - path: getDepositsCSV( { - userEmail, - locale, - dateAfter, - dateBefore, - dateBetween, - match, - statusIs, - statusIsNot, - storeCurrencyIs, - } ), - method: 'POST', - } - ); + const { + exported_deposits: exportedDeposits, + } = await apiFetch< { + /** The total number of payouts that will be exported in the CSV */ + exported_deposits: number; + } >( { + path: getDepositsCSV( { + userEmail, + locale, + dateAfter, + dateBefore, + dateBetween, + match, + statusIs, + statusIsNot, + storeCurrencyIs, + } ), + method: 'POST', + } ); createNotice( 'success', diff --git a/client/overview/modal/progressive-onboarding-eligibility/index.tsx b/client/overview/modal/progressive-onboarding-eligibility/index.tsx index 6f6be89a707..21a6e5a22fa 100644 --- a/client/overview/modal/progressive-onboarding-eligibility/index.tsx +++ b/client/overview/modal/progressive-onboarding-eligibility/index.tsx @@ -1,7 +1,7 @@ /** * External dependencies */ -import React, { useEffect, useState } from 'react'; +import React, { useState } from 'react'; import { __, sprintf } from '@wordpress/i18n'; import { addQueryArgs } from '@wordpress/url'; import { Button, Modal } from '@wordpress/components'; diff --git a/includes/class-wc-payments-order-service.php b/includes/class-wc-payments-order-service.php index f685b50debf..eb74cde866f 100644 --- a/includes/class-wc-payments-order-service.php +++ b/includes/class-wc-payments-order-service.php @@ -1752,10 +1752,8 @@ private function generate_dispute_closed_note( $charge_id, $status, $is_inquiry * @return string HTML note. */ private function generate_payment_refunded_note( float $refunded_amount, string $refunded_currency, string $wcpay_refund_id, string $refund_reason, WC_Order $order ): string { - $formatted_price = WC_Payments_Explicit_Price_Formatter::get_explicit_price( - wc_price( $refunded_amount, [ 'currency' => strtoupper( $refunded_currency ) ] ), - $order - ); + $multi_currency_instance = WC_Payments_Multi_Currency(); + $formatted_price = WC_Payments_Explicit_Price_Formatter::get_explicit_price( $multi_currency_instance->get_backend_formatted_wc_price( $refunded_amount, [ 'currency' => strtoupper( $refunded_currency ) ] ), $order ); if ( empty( $refund_reason ) ) { $note = sprintf( @@ -1930,7 +1928,11 @@ private function complete_order_processing( $order, $intent_status = null ) { * @return string The formatted order total. */ private function get_order_amount( $order ) { - return WC_Payments_Explicit_Price_Formatter::get_explicit_price( wc_price( $order->get_total(), [ 'currency' => $order->get_currency() ] ), $order ); + $multi_currency_instance = WC_Payments_Multi_Currency(); + $order_price = $order->get_total(); + + $formatted_price = $multi_currency_instance->get_backend_formatted_wc_price( $order_price, [ 'currency' => $order->get_currency() ] ); + return WC_Payments_Explicit_Price_Formatter::get_explicit_price( $formatted_price, $order ); } /** diff --git a/includes/multi-currency/MultiCurrency.php b/includes/multi-currency/MultiCurrency.php index b0784aa2f64..9c387175f5c 100644 --- a/includes/multi-currency/MultiCurrency.php +++ b/includes/multi-currency/MultiCurrency.php @@ -17,6 +17,7 @@ use WCPay\MultiCurrency\Logger; use WCPay\MultiCurrency\Notes\NoteMultiCurrencyAvailable; use WCPay\MultiCurrency\Utils; +use WC_Payments_Features; defined( 'ABSPATH' ) || exit; @@ -1338,6 +1339,31 @@ public function is_initialized(): bool { */ public function adjust_amount_for_selected_currency( $amount, $apply_charm_pricing = true ) { return $this->get_adjusted_price( $amount, $apply_charm_pricing, $this->get_selected_currency() ); + + /** + * Returns the amount with the backend format. + * + * @param float $amount The amount to format. + * @param array $args The arguments to pass to wc_price. + * + * @return string The formatted amount. + */ + public function get_backend_formatted_wc_price( float $amount, array $args = [] ): string { + // Return early if MC isn't enabled or merchant has a single currency. + if ( ! self::has_additional_currencies_enabled() || ! WC_Payments_Features::is_customer_multi_currency_enabled() ) { + return wc_price( $amount, $args ); + } + + $has_filter = has_filter( 'wc_price_args', [ $this->backend_currencies, 'build_wc_price_args' ] ); + if ( false !== $has_filter ) { + return wc_price( $amount, $args ); + } + + add_filter( 'wc_price_args', [ $this->backend_currencies, 'build_wc_price_args' ], 50 ); + $price = wc_price( $amount, $args ); + remove_filter( 'wc_price_args', [ $this->backend_currencies, 'build_wc_price_args' ], 50 ); + + return $price; } /** diff --git a/package-lock.json b/package-lock.json index 1ddaf7a4ded..faa46475b89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "woocommerce-payments", - "version": "8.6.1", + "version": "8.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "woocommerce-payments", - "version": "8.6.1", + "version": "8.7.0", "hasInstallScript": true, "license": "GPL-3.0-or-later", "dependencies": { diff --git a/package.json b/package.json index cf6c7f7b843..8a148ce18ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "woocommerce-payments", - "version": "8.6.1", + "version": "8.7.0", "main": "webpack.config.js", "author": "Automattic", "license": "GPL-3.0-or-later", diff --git a/readme.txt b/readme.txt index 0122e5021ae..b94d68e854d 100644 --- a/readme.txt +++ b/readme.txt @@ -94,6 +94,67 @@ Please note that our support for the checkout block is still experimental and th == 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 diff --git a/tests/unit/test-class-wc-payment-gateway-wcpay-process-refund.php b/tests/unit/test-class-wc-payment-gateway-wcpay-process-refund.php index b75d1721c16..f3a0aefa442 100644 --- a/tests/unit/test-class-wc-payment-gateway-wcpay-process-refund.php +++ b/tests/unit/test-class-wc-payment-gateway-wcpay-process-refund.php @@ -278,7 +278,7 @@ public function test_process_refund_save_wcpay_refund_id_to_refund_meta_and_orde $this->assertTrue( $result ); $this->assertStringContainsString( 'successfully processed', $latest_wcpay_note->content ); - $this->assertStringContainsString( wc_price( 19.99, [ 'currency' => 'USD' ] ), $latest_wcpay_note->content ); + $this->assertStringContainsString( WC_Payments_Multi_Currency()->get_backend_formatted_wc_price( 19.99, [ 'currency' => 'USD' ] ), $latest_wcpay_note->content ); $this->assertStringContainsString( 're_123456789', $latest_wcpay_note->content ); } @@ -349,7 +349,7 @@ public function test_process_refund_non_usd() { $this->assertTrue( $result ); $this->assertStringContainsString( 'successfully processed', $latest_wcpay_note->content ); - $this->assertStringContainsString( wc_price( 19.99, [ 'currency' => strtoupper( $currency ) ] ), $latest_wcpay_note->content ); + $this->assertStringContainsString( WC_Payments_Multi_Currency()->get_backend_formatted_wc_price( 19.99, [ 'currency' => strtoupper( $currency ) ] ), $latest_wcpay_note->content ); } public function test_process_refund_with_reason_non_usd() { @@ -419,7 +419,7 @@ public function test_process_refund_with_reason_non_usd() { $this->assertStringContainsString( 'successfully processed', $latest_wcpay_note->content ); $this->assertStringContainsString( 'some reason', $latest_wcpay_note->content ); - $this->assertStringContainsString( wc_price( 19.99, [ 'currency' => strtoupper( $currency ) ] ), $latest_wcpay_note->content ); + $this->assertStringContainsString( WC_Payments_Multi_Currency()->get_backend_formatted_wc_price( 19.99, [ 'currency' => strtoupper( $currency ) ] ), $latest_wcpay_note->content ); $this->assertTrue( $result ); } @@ -511,7 +511,7 @@ public function test_process_refund_interac_present() { $this->assertTrue( $result ); $this->assertStringContainsString( 'successfully processed', $latest_wcpay_note->content ); - $this->assertStringContainsString( wc_price( $amount, [ 'currency' => $currency ] ), $latest_wcpay_note->content ); + $this->assertStringContainsString( WC_Payments_Multi_Currency()->get_backend_formatted_wc_price( $amount, [ 'currency' => $currency ] ), $latest_wcpay_note->content ); } public function test_process_refund_interac_present_without_payment_method_id_meta() { @@ -591,7 +591,7 @@ public function test_process_refund_interac_present_without_payment_method_id_me $this->assertTrue( $result ); $this->assertStringContainsString( 'successfully processed', $latest_wcpay_note->content ); - $this->assertStringContainsString( wc_price( $amount, [ 'currency' => 'USD' ] ), $latest_wcpay_note->content ); + $this->assertStringContainsString( WC_Payments_Multi_Currency()->get_backend_formatted_wc_price( $amount, [ 'currency' => 'USD' ] ), $latest_wcpay_note->content ); } public function test_process_refund_interac_present_without_app_refund() { @@ -809,7 +809,7 @@ public function test_process_refund_card_present() { $this->assertTrue( $result ); $this->assertStringContainsString( 'successfully processed', $latest_wcpay_note->content ); - $this->assertStringContainsString( wc_price( $amount, [ 'currency' => strtoupper( $currency ) ] ), $latest_wcpay_note->content ); + $this->assertStringContainsString( WC_Payments_Multi_Currency()->get_backend_formatted_wc_price( $amount, [ 'currency' => strtoupper( $currency ) ] ), $latest_wcpay_note->content ); } public function test_process_refund_on_uncaptured_payment() { diff --git a/tests/unit/test-class-wc-payments-webhook-processing-service.php b/tests/unit/test-class-wc-payments-webhook-processing-service.php index 2acb5c318ad..e628c533848 100644 --- a/tests/unit/test-class-wc-payments-webhook-processing-service.php +++ b/tests/unit/test-class-wc-payments-webhook-processing-service.php @@ -652,6 +652,10 @@ public function test_payment_intent_successful_and_completes_order() { ->expects( $this->exactly( 2 ) ) ->method( 'save' ); + $this->mock_order + ->method( 'get_total' ) + ->willReturn( 15.00 ); + $this->mock_order ->expects( $this->exactly( 2 ) ) ->method( 'has_status' ) @@ -747,6 +751,10 @@ public function test_payment_intent_successful_and_completes_order_without_inten ->expects( $this->exactly( 2 ) ) ->method( 'save' ); + $this->mock_order + ->method( 'get_total' ) + ->willReturn( 15.00 ); + $this->mock_order ->expects( $this->exactly( 2 ) ) ->method( 'has_status' ) @@ -939,6 +947,10 @@ public function test_payment_intent_successful_and_send_card_reader_receipt() { ) ->willReturn( false ); + $this->mock_order + ->method( 'get_total' ) + ->willReturn( 15.00 ); + $this->mock_order ->expects( $this->once() ) ->method( 'payment_complete' ); @@ -1040,6 +1052,10 @@ public function test_payment_intent_successful_and_save_mandate() { [ '_intention_status', $intent_status ] ); + $this->mock_order + ->method( 'get_total' ) + ->willReturn( 15.00 ); + $this->mock_order ->expects( $this->exactly( 2 ) ) ->method( 'save' ); @@ -1123,6 +1139,10 @@ public function test_payment_intent_fails_and_fails_order() { ->with( '_payment_method_id' ) ->willReturn( 'pm_123123123123123' ); + $this->mock_order + ->method( 'get_total' ) + ->willReturn( 15.00 ); + $this->mock_order ->expects( $this->exactly( 3 ) ) ->method( 'has_status' ) @@ -1190,6 +1210,10 @@ public function test_payment_intent_without_charges_fails_and_fails_order() { ->with( '_payment_method_id' ) ->willReturn( 'pm_123123123123123' ); + $this->mock_order + ->method( 'get_total' ) + ->willReturn( 15.00 ); + $this->mock_order ->expects( $this->exactly( 3 ) ) ->method( 'has_status' ) diff --git a/woocommerce-payments.php b/woocommerce-payments.php index c606a36f8b9..5a8f4fb0485 100644 --- a/woocommerce-payments.php +++ b/woocommerce-payments.php @@ -11,7 +11,7 @@ * WC tested up to: 9.4.0 * Requires at least: 6.0 * Requires PHP: 7.3 - * Version: 8.6.1 + * Version: 8.7.0 * Requires Plugins: woocommerce * * @package WooCommerce\Payments