I am using woocommerce plugin, and added some product categories in appearance->menu. I mentioned that if I logging off, the product categories is not showing at all... please help.

sorry for bad english.

  • this should work though, have you cleared your cache? – Ewout Mar 26 '13 at 19:08
  • I was using several browsers... – andys Mar 26 '13 at 19:11
  • I saw in other forums was a problem to other people, but couldnt find a solution... If use woocommerce product categories widget so it is working... so I guess something with woocommerce and wp_nav_menu – andys Mar 26 '13 at 19:12
  • so if I understand correctly, you see the categories when you're logged in as admin, but not when you're logged out? Or do you mean that the menu does not save properly? (it works like it should in my setup) – Ewout Mar 26 '13 at 19:13
  • The menu save properly all is ok. I want to say that just logged users can see product categories in meniu front end. – andys Mar 26 '13 at 19:15

I found the answer. The main problem is:

First of all woocommerce plugin has own ID system. And wordpress has own ID system. And it happened that with the same ID was two different items. For example:

Woocommerce category name "my category" has ID: 13


Wordpress page "Logout" has ID: 13

So, in woocommerce where is function called "woocommerce_nav_menu_items" is checking pages like "Logout", "Change password", "View order", "Edit address" to avoid show if user is not logged in. And this function is checking if you are not logged in, unset all these pages which would be in menu.

And it's happened what my created category in woocommerce was with the same ID like created page "Logout".

My suggestion:

If this will happen to you just delete created category and create a new one, because the system will assign another ID to your category.

I hope this will help for many people.

  • Thanks for reporting back! I reported this too WooThemes too, not sure if you already did! (+maybe you can accept your own answer to mark this resolved) – Ewout Mar 27 '13 at 8:39
  • Just wanted to let you know that WooThemes was very quick to follow up on this issue, and they fixed it already! github.com/woothemes/woocommerce/commit/… – Ewout Mar 27 '13 at 22:06
  • glad to hear this ;) – andys Apr 1 '13 at 19:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.