wpsnoop Fatal error: Cannot redeclare sample_admin_notice__error()

If you are dealing with a WordPress issue where a PHP Function sample_admin_notice__error() was already declared it is most likely due to a plugin/theme conflict.

wpsnoop scanned and analyzed over 100,000 WordPress plugins and themes to find and locate potential conflicts including functions that share the same name.

This page has information on the 8 places where that function is declared and used in WordPress plugins and themes.

Note: Our database currently only taps into the free themes and plugins available in the publicly available WordPress plugins and themes, if your site uses paid plugins, themes or custom code there may be additional conflicts.


Our database has uncovered 8 different instances of potential conflicts where different plugins or themes share the function name.

Examples of this error include:

PHP Fatal error: Cannot redeclare sample_admin_notice__error() (previously declared in wp-content/plugins/accept-donations-with-custom-amount/sg-donation-woocommerce.php:88)

This file is part of the WordPress plugin Accept Donations with custom amount and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare sample_admin_notice__error() (previously declared in wp-content/plugins/responsive-iframe-watchdog/lgr_responsive_iframe_watchdog.php:643)

This file is part of the WordPress plugin Responsive Iframe Watchdog and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare sample_admin_notice__error() (previously declared in wp-content/plugins/conexao-wc-mercado-livre/notices_function.php:12)

This file is part of the WordPress plugin Conexão Wc Mercado Livre and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare sample_admin_notice__error() (previously declared in wp-content/plugins/soundcloud-is-gold/soundcloud-is-gold-notice.php:56)

This file is part of the WordPress plugin Soundcloud is Gold and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare sample_admin_notice__error() (previously declared in wp-content/plugins/flawless-themes-demo-importer/includes/class-flawless-demo-importer.php:315)

This file is part of the WordPress plugin Flawless Themes Demo Importer and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare sample_admin_notice__error() (previously declared in wp-content/plugins/elegant-themes-demo-importer/includes/class-elegant-demo-importer.php:288)

This file is part of the WordPress plugin Elegant Blog Themes Demo Importer and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare sample_admin_notice__error() (previously declared in wp-content/plugins/motors-car-dealership-classified-listings/includes/functions.php:812)

This file is part of the WordPress plugin Motors – Car Dealer, Classifieds & Listing and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare sample_admin_notice__error() (previously declared in wp-content/plugins/rich-snippets-enhancement-with-rank-math/rankmathschema.php:33)

This file is part of the WordPress plugin Rich Snippets Enhancement With Rank Math and could be interacting with another theme or plugin and causing a fatal error.

The error occurs because two (or more) plugins that you are using are both trying to declare a function with the same name.