Allow WC Shipping to use larger migration state machine enums #2804
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We'll start using the "state machine" in WC Shipping as well to make the overall structure a bit more consistent.
That means we cannot guarantee that WCS&T will know all states anymore, so this PR aims to disable our migration banner / feature announcement modal when the value is greater than
COMPLETED
.I also sneaked in a few
__()
.Related issue(s)
Steps to reproduce & screenshots/GIFs
wp option set wcshipping_migration_state 13
("COMPLETE" is 12, so 13 or anything higher will be good for testing)/wp-admin/admin.php?page=wc-orders
Create shipping label
modalCreate shipping label
modal/wp-admin/admin.php?page=wc-orders
wp option set wcshipping_migration_state 1
and verify the banner and feature announcement modal is showing since it's in a "not begun" state.wp option set wcshipping_migration_state 12
and verify the banner and feature announcement modal is hidden since it's in a "COMPLETED" state.Note: you might have issues seeing any of the migration banners/modals if you have the
wcst-wcshipping-migration-dismissed
cookie that temporarily hides everything.Checklist
changelog.txt
entry addedreadme.txt
entry added