Skip to content

Conversation

@rjchow
Copy link
Contributor

@rjchow rjchow commented Dec 15, 2022

All Submissions:

Changes proposed in this Pull Request:

Added a warning banner to the user when the tax settings are mismatched and in conflict.

Closes #35497 .

  • This PR is a very minor change/addition and does not require testing instructions (if checked you can ignore/remove the next section).

How to test the changes in this Pull Request:

  1. Set up woocommerce and enable tax settings in general woocommerce settings
  2. Go to tax settings tab
  3. If any of the 3 tax display settings (Prices entered with tax , Display prices in the shop, Display prices during cart and checkout) differ, there should be a warning banner.
  4. Clicking on "Use recommended settings" should change all the settings to be the same as the one set for "Prices entered with tax "

image

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you created a changelog file for each project being changed, ie pnpm --filter=<project> changelog add?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Dec 15, 2022
@rjchow rjchow force-pushed the add/tax-settings-error branch from aadc899 to 447fed0 Compare December 15, 2022 11:39
@rjchow rjchow requested review from a team, adrianduffell and chihsuan December 15, 2022 11:42
@rjchow rjchow marked this pull request as ready for review December 15, 2022 11:42
@rjchow rjchow force-pushed the add/tax-settings-error branch from 447fed0 to 79eab01 Compare December 15, 2022 11:44
adrianduffell
adrianduffell previously approved these changes Dec 15, 2022
Copy link
Contributor

@adrianduffell adrianduffell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great and tested well @rjchow, thanks for picking it up! 🚀

I'll follow-up with a PR to add snackbar notification when the settings are fixed.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 15, 2022

Test Results Summary

Commit SHA: 9f42835

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202611m 3s
E2E Tests183109019317m 23s

⚠️ Warning

Please address the following issues prior to merging this pull request:
  • FAILED/BROKEN TESTS. There were failed and/or broken API and E2E tests.

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@adrianduffell adrianduffell self-requested a review December 15, 2022 12:36
Copy link
Contributor

@adrianduffell adrianduffell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Copy link
Member

@chihsuan chihsuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and tested well! 🚀

@adrianduffell adrianduffell merged commit cc9f4b6 into trunk Dec 15, 2022
@adrianduffell adrianduffell deleted the add/tax-settings-error branch December 15, 2022 13:04
@github-actions github-actions bot added this to the 7.3.0 milestone Dec 15, 2022
samueljseay pushed a commit that referenced this pull request Dec 15, 2022
* Add WIP error handling when conflicting settings chosen

* add: enhance tax settings conflict warning

* Fix WC_Settings_Tax_Test::test_get_settings_for_default_section

* Wrap texts in i18n method

* Add snackbar

Co-authored-by: Adrian Duffell <[email protected]>
Co-authored-by: Chi-Hsuan Huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add guidance when configuring tax settings to avoid situations that result in apparent "rounding errors"

4 participants