Closed MdAsifHossainNadim closed 2 weeks ago
The changes involve significant modifications to the Categories
class in includes/ProductCategory/Categories.php
, specifically in the get_all_categories
and get_categories
methods. The caching mechanism in get_all_categories
has been removed, leading to a direct call to get_categories()
. The get_categories
method now utilizes get_terms()
instead of direct database queries, transforming the fetched categories into a structured format with array_map
and array_column
. The overall structure and logic for handling categories have been streamlined.
File | Change Summary |
---|---|
includes/ProductCategory/Categories.php | Refactored get_all_categories to remove caching and call get_categories() directly; modified get_categories to use get_terms() instead of $wpdb , restructuring the categories array. |
includes/ProductCategory/Categories.php
file regarding the category retrieval methods may relate to the overall structure and handling of data, which is also a focus in the includes/Assets.php
modifications for localization and script dependencies in PR #2377. Both PRs involve significant changes to how data is managed and retrieved within the application.QA approved
, :+1: Dev Review Done
, Upcoming Release
, Dependency With Pro
In the garden where the code does play,
A rabbit hops with joy today.
No more SQL, just terms so neat,
A simpler path, oh what a treat!
With every hop, the changes sing,
A happy dance for coding spring! 🐰✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All Submissions:
Changes proposed in this Pull Request:
Related Pull Request(s)
Closes
How to test the changes in this Pull Request:
Changelog entry
Fix: Vendor product category translation compatibility issue with WPML.
Detailed Description of the pull request. What was previous behaviour and what will be changed in this PR.
Before Changes
Describe the issue before changes with screenshots(s).
After Changes
Describe the issue after changes with screenshot(s).
Feature Video (optional)
Link of detailed video if this PR is for a feature.
PR Self Review Checklist:
FOR PR REVIEWER ONLY:
Summary by CodeRabbit
New Features
Bug Fixes