Home Forums Themes Support Pangja Template error with other plugin (Cannot redeclare tgmpa)

Tagged: , ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #3456


    I got an error while trying to activate the template:

    E_ERROR line 2118 in file ……/class-tgm-plugin-activation.php. Error message:
    Cannot redeclare tgmpa() (previously declared in …/ct-ultimate-gdpr/vendor/optimus-prime-plugin-update/class-tgm-plugin-activation.php:2127)

    If I disable my GDPR m-plugin, then I can activate the template.
    But as soon as I activate it again, the whole site is in error.
    Can you help me please?

    (I use this plugin on a lot of websites, it works fine…)

    Thank you!


    Thanks for contacting us and choosing our product!
    About this issue you can disable tgmpa in our theme by go to:
    wp-content/themes/pangja/framework/icludes/ then open file _init.php
    Go to like 32 and delete this code:
    require_once( get_template_directory() . '/framework/includes/tgmpa-register.php' ); // Required plugins for theme
    Hope this help!



    Hello Haru,

    Thanks for the fast answer.
    I’ve done that and I can now use my plugin with your theme but it’s not working when I place the file in the child theme. This means I will have to do it again on each update of the template you might do.
    Do you know if it’s possible to add something in the child theme for that?

    Thank you very much!


    If your plugin support customize template in child theme it will work.
    Here is topic we customize our plugin via child theme:

    How to customize WordPress theme using Child theme

    We used function haru_get_template to locale template display.
    Hope this help!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.