This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Update check for active cart template and migration routine #10462
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
woocommercebot
requested review from
a team and
wavvves
and removed request for
a team
August 3, 2023 13:21
opr
added
block: cart
Issues related to the cart block.
focus: template
Related to API powering block template functionality in the Site Editor
type: bug
The issue/PR concerns a confirmed bug.
labels
Aug 3, 2023
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +104 B (0%) Total Size: 1.34 MB
ℹ️ View Unchanged
|
opr
changed the title
WIP: Update check for active cart template
Update check for active cart template
Aug 3, 2023
mikejolley
force-pushed
the
fix/template-option
branch
from
August 4, 2023 12:31
b3c6c92
to
e4ea8fe
Compare
mikejolley
changed the title
Update check for active cart template
Update check for active cart template and migration routine
Aug 4, 2023
wavvves
approved these changes
Aug 4, 2023
wavvves
approved these changes
Aug 4, 2023
gigitux
pushed a commit
that referenced
this pull request
Aug 4, 2023
* Update cart/checkout endpoints * Remove updating option on every page load * Check placeholder page vs current page * Check placeholder page vs current page * Switch from Rest to PHP for migrating templates * Existing page used for migration must contain post-content to be suitable --------- Co-authored-by: Mike Jolley <[email protected]>
gigitux
added a commit
that referenced
this pull request
Aug 4, 2023
* classicBlock: add defensive type handling (#10475) * add testing instructions * Empty commit for release pull request * Update check for active cart template and migration routine (#10462) * Update cart/checkout endpoints * Remove updating option on every page load * Check placeholder page vs current page * Check placeholder page vs current page * Switch from Rest to PHP for migrating templates * Existing page used for migration must contain post-content to be suitable --------- Co-authored-by: Mike Jolley <[email protected]> * update version * add zip link --------- Co-authored-by: Luigi Teschio <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Thomas Roberts <[email protected]> Co-authored-by: Mike Jolley <[email protected]>
imanish003
pushed a commit
that referenced
this pull request
Aug 7, 2023
* Update cart/checkout endpoints * Remove updating option on every page load * Check placeholder page vs current page * Check placeholder page vs current page * Switch from Rest to PHP for migrating templates * Existing page used for migration must contain post-content to be suitable --------- Co-authored-by: Mike Jolley <[email protected]>
imanish003
added a commit
that referenced
this pull request
Aug 7, 2023
* Empty commit for release pull request * classicBlock: add defensive type handling (#10475) * Update check for active cart template and migration routine (#10462) * Update cart/checkout endpoints * Remove updating option on every page load * Check placeholder page vs current page * Check placeholder page vs current page * Switch from Rest to PHP for migrating templates * Existing page used for migration must contain post-content to be suitable --------- Co-authored-by: Mike Jolley <[email protected]> * Version bumping & documentation for release 10.8.1 The primary changes include: 1. **Version Bumping**: Updated the version from 10.8.0 to 10.8.1 in several files including `composer.json`, `package-lock.json`, `package.json`, `readme.txt`, `src/Package.php`, and `woocommerce-gutenberg-products-block.php`. 2. **Documentation**: - Added a new testing notes file for release 10.8.1 (`docs/internal-developers/testing/releases/1081.md`). This file provides testing procedures for two bug fixes introduced in this release. 3. **Changelog**: Updated the `readme.txt` to include the bug fixes in the 10.8.1 changelog section. This release focuses on enhancing stability and user experience by addressing critical bugs. * Update readme file * Add zip file for testing --------- Co-authored-by: github-actions <[email protected]> Co-authored-by: Luigi Teschio <[email protected]> Co-authored-by: Thomas Roberts <[email protected]> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Manish Menaria <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block: cart
Issues related to the cart block.
focus: template
Related to API powering block template functionality in the Site Editor
type: bug
The issue/PR concerns a confirmed bug.
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.
This PR updates the logic used to decide whether a template is active by checking the current post slug vs. the post slug for the Cart/Checkout page that is set in WooCommerce.
Previously the
woocommerce_cart_page_endpoint
option was used, however this is not set in some scenarios, and only seems to be set when manually updating the slug in WooCommerce > Settings > AdvancedMike edit:
As well as fixing the detection, this fixes the migration if the migration is triggered by a non-logged in user, by switching from a REST endpoint, to raw PHP.
Fixes the failing e2e tests for Cart template.
Other Checks
[type]
label or a[skip-changelog]
label.Testing
Automated Tests
User Facing Testing
Dev testing
Ensure the playwright tests have passed!
has_migrated_cart
andhas_migrated_checkout
entries from fromwp_options
Appearance > Editor > Templates > Manage all templates
and verify content from cart and checkout pages have been correctly migrated.WooCommerce Visibility
Performance Impact
Changelog