-
Notifications
You must be signed in to change notification settings - Fork 219
Add woocommerce_cart_item_permalink
filter to cart item endpoint
#8726
Conversation
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: 0 B Total Size: 1.12 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works fine for the Cart items. However, it doesn't work for the items in the cross-sells or any other block. Is there any specific reason?
Do you think it should work for all products, cross-sells block?
@tarunvijwani In core this is a filter specific to cart items—I don't think those other locations quality. it is commonly used to edit the "edit" item URL from the cart to populate things like forms. |
Applies the
woocommerce_cart_item_permalink
filter from core (cart templates) to the cart item schema in the Store API. This allows the permalink back to product pages from the cart to be modified.Fixes #8119
Testing
Automated Tests
User Facing Testing
This is developer facing. You can test this by adding some code:
After which all links back to product pages from the block cart will have
?test=working
after the product URL.WooCommerce Visibility
Changelog