-
Notifications
You must be signed in to change notification settings - Fork 156
Fix feed importer and categories #3297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix feed importer and categories #3297
Conversation
b6b119b
to
45162aa
Compare
@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
0791b64
to
f15155c
Compare
@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…ategory UI with Select2 dependency and simplified JavaScript
…oduct Category fields
…HTML entity fixes
…instead of 'name'
…ment progressive loading (6KB vs 525KB), fix category persistence for imported/created products, restore Enhanced Catalog Attributes functionality, remove duplicate AJAX handlers, fix CSS styling, clean up debug logs, add category path reconstruction and name lookup handlers, improve error handling, prevent browser crashes
f15155c
to
6930fc2
Compare
@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Description
This PR fixes critical performance and functionality issues in the Facebook for WooCommerce plugin's Google Product Category system that were causing browser crashes and "Page Unresponsive" errors.
Primary Issue: The plugin was loading all 5,582 Google product categories (525KB of JSON data) into the browser simultaneously, overwhelming memory and causing crashes, particularly on product edit pages for feed-imported products.
Root Cause: Feed-imported products with Google Product Categories containing HTML entities (like
'Clothing & Accessories > Clothing > Shirts & Tops'
) triggered loading of the entire category dataset during hierarchy reconstruction, exhausting browser memory.Solution: Implemented progressive loading architecture that reduces initial payload from 525KB to ~6KB (98.9% reduction) while maintaining full functionality through on-demand AJAX loading.
Additional Fixes:
Dependencies: No new dependencies required. Uses existing WordPress AJAX infrastructure.
Type of change
Checklist
Changelog entry
Fix Google Product Category browser crashes by implementing progressive loading (6KB vs 525KB), restore Enhanced Catalog Attributes functionality, and improve category persistence for imported products.
Test Plan
Test Environment:
Test Cases:
Performance Test:
Category Persistence Test:
Enhanced Attributes Test:
Progressive Loading Test:
Screenshots
Before
After
Performance Metrics: