The 'shop' page in WooCommerce (listing all the products) gives me a fatal error in the Propulsion theme and I can't figure out how to fix it:
Fatal error: Call to a member function is_visible() on a non-object in [...] public_html/wp-content/plugins/woocommerce/templates/loop-shop.php on line 24
I have read many forum posts here, and on the WooThemes site (and a few other places) that indicate that this problem has happened to others. However, none of the fixes they suggest work for me, as far as I can tell. Perhaps I am incorrectly applying the fixes, but I don't think so. I have tried:
- Re-saving my Permalinks. I go to settings > permalinks and change the permalink for 'Page permalink' to something else, save the change, then return it to my original (saving it again).
- Disabling WooCommerce, logging out, then re-enabling it.
- Deleting WooCommerce completely, then re-installing it and enabling it.
- Adding a product (some people said they only get this error with no products). I tried this, but also already had all the imported 'sample' products that come from 'Import Dummy Content' so I never actually had no products anyway.
None of these fixes work for me. There is only one way I can make the Shop page work, and that is if I set my 'Page permalink' just to:
This is not a viable solution for me though, because I am re-creating a legacy site that has been around for 10 years with 50+ pages that all end in '.html' some of which have decent traffic. So unless there is some other option (don't want redirects for all the pages) I think I need to set the permalinks to:
For reference I am also using the 'Permalink Editor' plugin.
My question is, what can I do to fix this? Or do I have to abandon WooCommerce since it appears (to me so far) to be bugged when being set up for a legacy site that needs '.html' pagename extensions? Some people write about making direct changes to the php code in the 'loop-shop.php' file and I suppose I could try to figure out what change is needed and attempt this, but I hesitate to start down that road.