Title: Fatal Error Due to Duplicate Function Declaration in Code Snippets Plugin
Last modified: March 16, 2025

---

# Fatal Error Due to Duplicate Function Declaration in Code Snippets Plugin

 *  Resolved [bahraingeneral](https://wordpress.org/support/users/bahraingeneral/)
 * (@bahraingeneral)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-due-to-duplicate-function-declaration-in-code-snippets-plugin-2/)
 * Hello,
 * I am facing a fatal error on my WordPress website after activating the “Code 
   Snippets” plugin. The error message displayed is:
 * “Fatal error: Cannot redeclare convert_order_item_total_to_bhd()”.
 * This error indicates that there is a conflict caused by redeclaring the function`
   convert_order_item_total_to_bhd()` within the code added via the “Code Snippets”
   plugin. As a result, I cannot access the WordPress admin dashboard, and the site
   is showing as down.
 * I need help either disabling the plugin or modifying the code to prevent the 
   function from being declared multiple times.
 * Additional Information:
    - Site URL: generalbahrain.com
    - WordPress Version: 6.7.1
    - Plugin causing the issue: Code Snippets (version 3.6.8)
    - PHP Version: 8.1.31
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-due-to-duplicate-function-declaration-in-code-snippets-plugin-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Yordan Soares](https://wordpress.org/support/users/yordansoares/)
 * (@yordansoares)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/fatal-error-due-to-duplicate-function-declaration-in-code-snippets-plugin-2/#post-18417828)
 * Hi [@bahraingeneral](https://wordpress.org/support/users/bahraingeneral/),
 * You could try adding the following constant in your `wp-config.php` file (located
   at the root directory of your WordPress installation), just before the line that
   reads `/* That's all, stop editing! Happy blogging. */`:
 *     ```wp-block-code
       define( 'CODE_SNIPPETS_SAFE_MODE', true );
       ```
   
 * See: [Help! My site broke! How can I fix it?](https://help.codesnippets.pro/en/article/12-safe-mode)
 *  Plugin Author [Imants](https://wordpress.org/support/users/0aksmith/)
 * (@0aksmith)
 * [10 months, 2 weeks ago](https://wordpress.org/support/topic/fatal-error-due-to-duplicate-function-declaration-in-code-snippets-plugin-2/#post-18575742)
 * Thank you [@yordansoares](https://wordpress.org/support/users/yordansoares/) 
   for your helpful suggestion to enable Safe Mode, this is indeed a great first
   step when troubleshooting.
   [@bahraingeneral](https://wordpress.org/support/users/bahraingeneral/),
   I’d just like to add that if you see errors referencing the snippets-ops.php 
   file, they most often relate to an issue inside one of your activated snippets,
   such as a duplicate function declaration or a typo. Please carefully read the
   PHP error message; it usually points directly to the problematic code.Reviewing
   and correcting the affected snippet should resolve the issue, and please let 
   us know if you still need help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fatal Error Due to Duplicate Function Declaration in Code Snippets Plugin’
is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Imants](https://wordpress.org/support/users/0aksmith/)
 * Last activity: [10 months, 2 weeks ago](https://wordpress.org/support/topic/fatal-error-due-to-duplicate-function-declaration-in-code-snippets-plugin-2/#post-18575742)
 * Status: resolved