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

Shipping Settings: Revert removal of default method names #41833

Merged
merged 4 commits into from Dec 3, 2023

Conversation

psealock
Copy link
Contributor

@psealock psealock commented Dec 1, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

In #40838 default names for WooCommerce Shipping Zone methods was removed in favour of displaying a placeholder. In the case below e.g. Free shipping. The removal of the default is causing issues with previously configured methods that relied on there being a default.

image

It appears to have been a mistake to remove the default names of methods because systems interacting with shipping zone methods work under the assumption the default exists, and so this was a backwards incompatible change. This PR revert that changes and resets some unit and e2e tests back to their original state.

How to test the changes in this Pull Request:

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

  1. Create a new JN site, but not from this branch. Make sure it includes the lastest WCX 8.3 release. You will see the old shipping zone method dialog which will allow you to enter a method without a name.
  2. Add a shipping zone for the US, and add a free shipping method. Be sure to leave the name field as is.
  3. Try adding a shippable product to the cart, and try to calculate shipping fees for an address in the US (it should work).
  4. Now update WooCommerce to a zip of this branch. You can download it here.
  5. Visit the shipping zone setting page, /wp-admin/admin.php?page=wc-settings&tab=shipping and see the "Shipping method(s)" column have names underneath.
  6. Now go back to the checkout screen and refresh. You should see the shipping method available.
  7. Finally, try adding a new shipping method. See the name field show the default values "Free shipping", "Flat rate", or "Local pickup" depending on the type.

Changelog entry

  • Automatically create a changelog entry from the details below.

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

Comment

Fixes a bug found in unreleased feature. No changelog needed.

@github-actions github-actions bot added focus: e2e tests Issues related to e2e tests plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Dec 1, 2023
@psealock psealock closed this Dec 1, 2023
@psealock psealock reopened this Dec 1, 2023
Copy link
Contributor

github-actions bot commented Dec 1, 2023

Test Results Summary

Commit SHA: 2d8a192

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 35s
E2E Tests256006026218m 25s

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.

@psealock psealock requested review from rodelgc, a team, chihsuan and moon0326 December 1, 2023 04:51
Copy link
Contributor

github-actions bot commented Dec 1, 2023

Hi @chihsuan, @rodelgc, @moon0326, @woocommerce/ghidorah

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

3 similar comments
Copy link
Contributor

github-actions bot commented Dec 1, 2023

Hi @chihsuan, @rodelgc, @moon0326, @woocommerce/ghidorah

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

github-actions bot commented Dec 1, 2023

Hi @chihsuan, @rodelgc, @moon0326, @woocommerce/ghidorah

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

github-actions bot commented Dec 1, 2023

Hi @chihsuan, @rodelgc, @moon0326, @woocommerce/ghidorah

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

@rjchow
Copy link
Contributor

rjchow commented Dec 1, 2023

I wasn't able to test this because when I used WC 8.3.1, I saw the old shipping dialogs. If I use the live branch from the other PR, I'm also not allowed to leave the shipping method name empty

@psealock
Copy link
Contributor Author

psealock commented Dec 1, 2023

I wasn't able to test this because when I used WC 8.3.1, I saw the old shipping dialogs.

Yes, sorry I wasn't clear on this @rjchow. You will create the shipping zone method using the old UI in WC 8.3. This will allow you to enter a Shipping Method using the default value for "Name" field. Then, update to this branch's WC and confirm no errors exist.

If I use the live branch from the other PR, I'm also not allowed to leave the shipping method name empty

Indeed this is correct. The idea is to re-create a scenario where merchants would have created a method in the old dialog that has a default value, updated to the new, and seen errors due to missing "name" value.

Copy link
Contributor

@rjchow rjchow left a comment

Choose a reason for hiding this comment

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

With the updated test instructions it seems to work fine! Thanks

@psealock psealock merged commit d25ebd0 into trunk Dec 3, 2023
19 checks passed
@psealock psealock deleted the fix/shipping-settings-no-defaults branch December 3, 2023 01:15
@github-actions github-actions bot added this to the 8.5.0 milestone Dec 3, 2023
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Dec 3, 2023
@rodelgc rodelgc modified the milestones: 8.5.0, 8.4.0 Dec 4, 2023
@alopezari alopezari added needs: internal testing Indicates if the PR requires further testing conducted by Solaris 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 Dec 5, 2023
psealock added a commit that referenced this pull request Dec 6, 2023
rodelgc pushed a commit that referenced this pull request Dec 7, 2023
Manually apply changes from #41833 that were omitted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: e2e tests Issues related to e2e tests needs: internal testing Indicates if the PR requires further testing conducted by Solaris 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

4 participants