Enable re-select category for Featured Category block #4559
Enable re-select category for Featured Category block #4559
Conversation
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.
Thanks for working on this @thisissandip, it looks promising!
One issue I noticed is that after changing the category, the button link is still pointing to the previous category. Ie: if you select Clothing, then click the 'Edit' button and select T-Shirts. The button will still be linking to Clothing.
I remember we had a similar issue in the Featured Product block. It was solved in this commit: 5d85b0e#diff-7664311fec7278a6254b7583f11a7d7df2ebbb5ab350cc4440430dbb3a815757. I think you will need to copy & paste all changes from that commit into the Featured Category block. Be aware of changing product
with category
in some places.
Let us know if you have any questions and thanks for contributing! 🙂
@Aljullu Thank you for taking a look! 😄 I have made the required changes. |
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.
Thanks for updating this PR @thisissandip. This is working like a charm now and code changes look good! I left a minor comment below, but once it's addressed this should be ready for merge.
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
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.
Thanks for updating @thisissandip. I will merge this PR once all automated workflows pass and, if everything goes well, it will be included in WC Blocks 5.7.0 and WooCommerce core 5.7.0. Thanks again for your contribution. 🥳
Linting job is failing but it doesn't seem related to this PR (error is: I will merge this PR as-is and keep an eye open in case the linting job fails in other PRs. |
I ran |
@Aljullu Thank you for reviewing and merging this PR! 🚀 |
Fixes #4177
It was not possible to re-select the selected category of a featured category block, This PR adds the edit button (pencil icon) to the block toolbar that allows changing the selected category.
Screenshots
How to test the changes in this Pull Request:
Changelog