-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Fix tax task showing as not completed after setting up tax #36468
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
Conversation
Test Results SummaryCommit SHA: 06a6fcb
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. |
ilyasfoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome fix, @chihsuan! LGTM. Makes sense to not have e2e at the moment for this flow.
rjchow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me other than the comment on the dependency array!
| try { | ||
| await Promise.all( [ | ||
| updateAndPersistSettingsForGroup( 'tax', { | ||
| tax: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not introduced by this PR, but I'm surprised there's no bug or lint complaint about taxSettings not being in the useCallback dependency array.
Do you know if it's necessary to add it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I took a quick look, and I think it's okay for new users because there are only default tax settings. But we should better add it to the dependency array to avoid some edge cases. I'll create an issue for it. We may need to look into it deeper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue created #36502
* Wait for requests to finish before redirecting * Add changelog
* Wait for requests to finish before redirecting * Add changelog
All Submissions:
Changes proposed in this Pull Request:
Closes #35745.
Wait for requests to finish before redirecting to make sure the wc_connect_taxes_enabled option is set synchronously.
Ideally, we should also add a test for it, but it's a bit challenging because it requires a Jetpack connection to complete the flow. I think we can tackle this problem when we start to work on the e2e project.
How to test the changes in this Pull Request:
WooCommerce > Home > Add tax ratesYou can use this release zip file for testing.
Other information:
pnpm --filter=<project> changelog add?FOR PR REVIEWER ONLY:
Screen.Recording.2023-01-17.at.16.18.37.mov