Gas
Gas

Reputation: 737

Woocommerce template override not working with woocommerce.php

I have a template file with customisations driving a woocommerce site, and recently updated to Woocommerce 2.1.2.

The problem is that the changes made to the inserted myTemplate/woocommerce/archive-product.php are not functioning, only when I delete woocommerce.php, but then all my previous customisations are lost

I have the code in my woocommerce.php, as suggested

<?php woocommerce_content(); ?>

And added support in my function.php like this:

add_theme_support( 'woocommerce' );

The other template files eg. woocommerce/content-single-product.php seem to work with the changes I make to them...

Is it because the update to v2? How can it be fixed that my customisations are working?

Also, I tried copying the archive-product.php to plugins/woocommerce folder, but it seems it is still not using that file...

Upvotes: 0

Views: 4005

Answers (1)

Luis Florez
Luis Florez

Reputation: 26

Try going to /wp-content/plugins/woocommerce/includes/class-wc-template-functions.php

Comment the lines like this:

if ( is_singular( 'product' ) ) 
{

//while ( have_posts() ) : the_post();

              wc_get_template_part( 'content', 'single-product' );

//endwhile;

} else { ...

Upvotes: 1

Related Questions