Link to home
Start Free TrialLog in
Avatar of Eoin OSullivan
Eoin OSullivanFlag for Ireland

asked on

All categories suddenly disappear on backend in WooCommerce

I've a WordPress (3.9.3) with WooCommerce (2.0.19) on a website.
Suddenly a short time ago ALL the Product Categories are not visible when editing products or under the Categories section on the WooCommerce Products tab.

I have not upgraded WordPress or WooCommerce during the period when the Categories disappeared.
On the frontend of the website (http://www.owenoneillfurniture.com/) all of the products created prior to this issue occurring appear perfectly and categories are visible in menus & dropdowns however I cannot edit or add any new products as the Categories are no longer visible.
User generated imageUser generated image
When I look at the database I can still see all the Categories listed in the wpterms table .. they appear to be correctly linked to all the current products (posts) via the wpterm_relationships table.
Has anyone else experienced this?
Does anyone have a resolution/suggestion of a fix?

Unfortunately upgrading WordPress or WooCommerce is not a possibility in the short term as both are heavily tied into a theme which will need some work to upgrade.

What I cannot understand is how the Categories work on the frontend but have completely disappeared on the backend for editing products.
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Eoin OSullivan

ASKER

Jason
No plugins were added or updated lately.

However after taking the precaution of backing up the Database and Filesystem I DEACTIVATED and REACTIVATED the WooCommerce plugin and BINGO .. it was working again.

Not sure how or why the toggling of the plugin worked .. but there you go!
Often the simplest things turn out to be the problem .. thanks for reminding me to try the deactivation option
Not sure how or why the toggling of the plugin worked .. but there you go!

Most cart software treats products and product meta as a custom post type so that has to be defined each time the plugin is loaded.  It's possible, albeit not common, for the the internal rewrite rules cache to regenerate without including that file and that's when things disappear out of the admin.  From the front end, a database entry is a database entry so things continue to work there.

Deactivating/reactivating a well-written plugin usually runs the flush_rewrite_rules() function on re-activation and that fixes problems like this.