Closed harriswong closed 3 months ago
👋 Hi @waclawjacek, I responded to all the comments. There are 2 remaining items to be discussed:
WC_Connect_Options::update_option
?Please take another look!
👋 Hey @waclawjacek , I have addressed all your comments, please take another look!
Description
Upon clicking "Update now", this PR sets the migration state to
MIGRATION_STATE_STARTED
(2
) before the migration begins. Then, the plugin install, activates WooCommerce Shipping and WooCommerce Tax. Followed by deactivating WCS&T. When it's done, it sets the migration state toMIGRATION_STATE_COMPLETED
(3
).Related issue(s)
NA
Steps to reproduce & screenshots/GIFs
classes/class-wc-connect-service-settings-store.php
and changeis_eligible_for_migration()
to returntrue
. Something like thisreturn $migration_state !== WC_Connect_API_Constants::MIGRATION_STATE_COMPLETED && true;
. Thetrue
flag mimic the connect server's flag.wp_options
wherename
=wc_connect_options
. In the serializedoption_value
, you should see"wcshipping_migration_state";i:3;
.Re-running the test
This PR sets a flag
wcshipping_migration_state
so once you "completed" migration, the modal won't show up again. To get around this, addWC_Connect_Options::delete_option('wcshipping_migration_state');
to theis_eligible_for_migration()
function so it will always delete the option first. For example, my local dev testing function looks like this:Checklist
changelog.txt
entry addedreadme.txt
entry added