Add migration to move incorrectly stored payment token IDS to HPOS tables #39724
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.
Submission Review Guidelines:
Changes proposed in this Pull Request:
This is a follow-up from #39381 and adds a migration to move over _payments_token meta to the order meta table. Note that we already have a "hot migration" in place, i.e. every time we get payment token meta, we also check the post meta table if the orders table is empty, so migration being complete should not be a prerequisite for orders payment tokens to work.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Since nothing uses payment token in vanilla WooCommerce, we will be using CLI to run this migration.
wp shell
and run following commands:wp option update woocommerce_version 8.0.0
You should see a serialized value, for example, if the value when getting from code is [1], then the serialized will be a:1:{i:0;i:1;}.
Changelog entry
Significance
Type
Message
Comment