0
votes

Recently I installed a wordpress plugin called WooCommerce on our website. Everything has installed correctly but when trying to add a product category to WooCommerce I am getting this error when I click the "Save" button:

Fatal error: Cannot redeclare woocommerce_output_related_products() (previously declared in /home/judgefuels/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php:1091) in /home/judgefuels/public_html/wp-content/themes/dt-presscore/inc/woocommerce-support.php on line 55

I am running Wordpress 4.0 and the latest version of WooCommerce.

Any help would be greatly appreciated.

1
Looks like your theme already has the WooCommerce functionality you're trying to add (or at least functions with the same name) - AlliterativeAlice
@AlliterativeAlice Thanks for your reply, I will take a look at the theme documentation and maybe see if theres a line to be removed in the theme coding or remove that file. - user3566506
In WooCommerce 2.2+ woocommerce_output_related_products() is pluggable and so wrapped with an is(!function_exists()) wrapper, so that shouldn't happen. Are you sure you have the latest version (2.2.4). You could try reuploading the WooCommerce files. - helgatheviking

1 Answers

0
votes

@AlliterativeAlice - Thanks for the solution with this issue!

I removed the same line of code in the theme folder which conflicted with WooCommerce files and it has solved the issue and all working fine now!

Thanks again