Class not found - extending Walker_Nav_Menu

I have a composer package installed for adding BEM naming to my menu classes etc.

I’ve had this installed for about 1.5 years without issue/error. With no recent changes I am suddenly getting the following on a composer install:

Fatal error: Class 'Walker_Nav_Menu' not found in /Users/jordancharters/code/devtesting/ on line 5

The following is in the walker.php file of the composer file.


namespace CP\BEM;

class navWalker extends \Walker_Nav_Menu

As we have \ it should be using the class as declared in the WP core. I tried with App\Walker_Nav_Menu too, no luck.

This topic was automatically closed after 42 days. New replies are no longer allowed.