Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't recommend WCS&T in tax task if WCShip or WCTax is active #48699

Conversation

waclawjacek
Copy link
Contributor

@waclawjacek waclawjacek commented Jun 20, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

Part of woocommerce/woocommerce-shipping#187.

If the "WooCommerce Shipping" or "WooCommerce Tax" extension is active, don't recommend the incompatible "WooCommerce Shipping & Tax" extension.

This PR implements the above restriction in the WC > Home > task list > Collect sales tax task.

Screenshots

Before:

(Note the screenshot recommends "WooCommerce Tax" but the solution used under the hood is actually the "WooCommerce Shipping & Tax" extension.)

Screenshot 2024-06-06 at 13 59 50

After, if WCShip or WCTax is present:

Screenshot 2024-06-06 at 14 00 11

(The "Configure" button leads to the WC > Settings > Tax > Standard rates page.)

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Build WC from this PR and install it on a fresh site.
  2. Skip the onboarding and set the store location to US California.
  3. Go to WC > Home and try going through the Collect sales tax task with WCShip/WCTax enabled and disabled. WCS&T should only be recommended when neither of WCShip/WCTax is active.

Changelog entry

  • Automatically create a changelog entry from the details below.
  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Changelog Entry Comment

Comment

If either the upcoming WooCommerce Shipping or WooCommerce Tax extension is active, don't suggest WooCommerce Shipping & Tax in the "Collect sales tax" Home task.

This only adjusts the extension recommendation merchants receive and does not affect any other functionality.

@waclawjacek waclawjacek self-assigned this Jun 20, 2024
@github-actions github-actions bot added package: @woocommerce/data issues related to @woocommerce/data plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Jun 20, 2024
Copy link
Contributor

github-actions bot commented Jun 21, 2024

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

Copy link
Contributor

github-actions bot commented Jun 21, 2024

Size Change: 0 B

Total Size: 2.49 MB

compressed-size-action

@waclawjacek waclawjacek marked this pull request as ready for review June 21, 2024 20:11
@waclawjacek waclawjacek requested review from a team and Ferdev and removed request for a team June 21, 2024 20:11
Copy link
Contributor

Hi @Ferdev,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

@Ferdev Ferdev left a comment

Choose a reason for hiding this comment

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

Code looks good 👍
I built WooCommerce (this branch), latest WooCommerce Shipping and latest WooCommerce Tax and installed them on a new site. With WooCommerce Shipping and WooCommerce Tax disabled, the collect tax task shows "WooCommerce Tax" in the first step of the wizard. If any of them are enabled, or both, the "WooCommerce Tax" extension is not recommended anymore.
So yeah, this is ready to ship :shipit: Thanks!

@waclawjacek waclawjacek merged commit 00f7420 into trunk Jun 25, 2024
41 of 42 checks passed
@waclawjacek waclawjacek deleted the tweak/dont-recommend-wcservices-in-tax-task-with-wcship-or-wctax-active branch June 25, 2024 12:23
@github-actions github-actions bot added this to the 9.2.0 milestone Jun 25, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Jun 25, 2024
@rodelgc rodelgc added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. package: @woocommerce/data issues related to @woocommerce/data plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants