• Resolved MoonDog

    (@moondog)


    I just attempted to update to the newest version and got this error:

    Fatal error: Cannot redeclare wc_get_template() (previously declared in /home/christm1/public_html/wp-content/themes/christmas-lights-creations/functions.php:222) in /home/christm1/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 172

    The plugin did not reactivate and doing so killed my site. I’ve contacted my web host to address the issue. If anyone has had a similar problem updating to the new version, please let me know how you resolved it.

    Thanks.

    https://ww.wp.xz.cn/plugins/woocommerce/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor royho

    (@royho)

    So as it states in your error, your theme is causing the issue. It is using a function name that is already declared in WooCommerce.

    Thread Starter MoonDog

    (@moondog)

    Thanks for your reply. The theme never caused an issue with the previous versions, so I don’t understand why now. I’ve been using the same theme, child theme and functions.php for nearly two years. That doesn’t make any sense. But thank you again for replying.

    Plugin Contributor royho

    (@royho)

    Just because it didn’t caused any trouble in the past doesn’t mean it won’t now because as plugins update, new code is changed/added. Test it yourself by changing themes and see if it works then.

    Thread Starter MoonDog

    (@moondog)

    I figured out the problem. You were absolutely right. I forgot to update the child theme functions file. Thanks for shoving me in the right direction.

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

The topic ‘Fatal Error V 2.2.11’ is closed to new replies.