[BUG FIX] Menu attributes not showing up on Menu Admin Screen
-
Hi there,
We were having a problem with activated attributes under Products > Attributes Menu Manager page not showing up under Appearance > Menus.
Products > Attributes Menu Manager page
Attribute Name: Menu Status
Attribute 1: Off
Attribute 2: On
Attribute 3: Off
Attribute 4: On
Attribute 5: Off
Attribute 6: OnBefore issue occurred
Initially the attributes showed up under Appearance > Menus. Attribute 2, 4 and 6 worked fine.
Issue occurred after changing labels and slugs
After changing attribute name and slug for Attribute 2 and 4, they disappeared from the admin screen and wouldn’t display even after resaving the Products > Attributes Menu Manager page.
Attribute 6 was working perfectly fine as this was never changed around in name and slug.
Fixing the issue
You may want to look at the following fix below and make it better for future updates and include it in your next version release.
<wordpress_install_directory>/wp-content/plugins/woocommerce-attributes-menu-manager/index.php
line 299:Find:
$attr_slug = wc_attribute_taxonomy_name($names->attribute_label);
Replace:$attr_slug = wc_attribute_taxonomy_name($names->attribute_name);
SQL query (optional step)
DELETE FROM
wp_options
WHEREoption_name
LIKE ‘wc_attribute_menu’Just to make sure there was a clean setup, I ran the following SQL query on the database and then resaved the options under Products > Attributes Menu Manager
- The topic ‘[BUG FIX] Menu attributes not showing up on Menu Admin Screen’ is closed to new replies.