After installing a new Plugin in WordPress called Native Apps Builder I got the following error when I tried to go to the Plugin’s settings:

imageFatal error: Cannot redeclare class Snoopy in www/blog/wp-content/plugins/native-apps-builder/appsbuilderapi.php on line 34

This error is caused because a class named "Snoopy" is being declared twice. I figured that two plugins were incompatible with each other so I first needed to know which ones.

Easiest way to find that out is to use the Linux Shell and search for the string Snoopy in all files from the WordPress Plugin folder:


I opened the first file that was also using Snoopy, sitemap-core.php:

I concluded from that code that Snoopy is already included in WordPress by default in the wp-includes folder.

I openend wp-includes/class-snoopy.php and the class is only loaded conditionally:

This seemed like the proper way to do it so I decided to modify appsbuilderapi.php to define the class Snoopy conditionally as well.

Go to the plugin in WordPress and click Edit:


Select the proper file from the filelist:


Scroll down to the class definition (class Snoopy) and insert the following line before it:

Then scroll down to the end of the class definition and add an endif to close the condition:

Click Update File to save the changes and then it works: