WooCommerce Services is a feature plugin that integrates hosted services into WooCommerce (3.0+), and currently includes automated tax rates and the ability to purchase and print USPS shipping labels.
GNU General Public License v2.0
108
stars
20
forks
source link
Allow WC Shipping to use larger migration state machine enums #2804
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.
Run wp option set wcshipping_migration_state 13 ("COMPLETE" is 12, so 13 or anything higher will be good for testing)
Go to /wp-admin/admin.php?page=wc-orders
Verify you see the migration banner
Go to any shippable order
Open the Create shipping label modal
Verify you see the Feature Announcement modal
Checkout this branch
Refresh the order page
Open the Create shipping label modal
Verify the Feature Announcement is no longer showing
Go to /wp-admin/admin.php?page=wc-orders
Verify the banner is no longer showing
Bonus!
Run 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.
Run 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.
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