Roots 7.0.3 + WooCommerce 2.3.1 Template Overrides not Overriding

Hey guys,

I’m am attempting to Override my WooCommerce templates in order for Roots to integrate well with WooCommerce. This is all on an absolutely fresh install of:

  • Wordpress 4.1
  • Roots 7.0.3
  • WooCommerce 2.3.1

Just to start, I want to say that I’ve tried everything on these pages.

In fact, my Overrides are supposed to be ‘Working’.
WooCommerce Status shows that it recognizes my overrides - http://d.pr/i/oNLW/4FM0YNia

What I’m trying to do:

I’m trying to remove the header and the sidebar call from the template so that Roots can render the appropriate theme template parts from the wrapper.

Initially I used the <?php woocommerce_content(); ?> technique but that didn’t work. Then I literally copied and pasted the exact templates from ../plugins/woocommerce/templates/ and modified from there, still nothing.

Unfortunately no matter how much I change the overriding WooCommerce template it won’t do anything. I’ve even tried a blank php with <?php echo "Hello World"; ?> and nothing.

Things I’ve tried:

  • <?php woocommerce_content(); ?> within both templates, using the woocommerce directory technique and directly within the root of the Roots theme technique.

  • woocommerce.php within the root of the Roots theme. (roots/woocommerce.php)

  • archive-product.php within the root of the Roots theme. (roots/archive-product.php)

  • single-product.php within the root of the Roots theme. (roots/single-product.php)

  • archive-product.php within the root of the woocommerce directory, which is within root of the Roots theme. (roots/woocommerce/archive-product.php)

  • single-product.php within the root of the woocommerce directory, which is within root of the Roots theme. (roots/woocommerce/single-product.php)

  • add_theme_support( 'woocommerce' ); in extras.php has no effect other than removing the unsupported theme notification (as expected)

  • Checked template permissions. Nothing out of the ordinary.

  • add_filter('woocommerce_show_page_title', '__return_false'); + remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 5); Doesn’t seem to have any effect other than removing the Title within the content. (as expected)

Yet for some reason, WooCommerce sees my overrides and is ignoring them for some reason? This leads me to believe that the Roots wrapper is somehow affecting this but I’m still unsure.

Anybody else have this issue?

Okay, I have found the issue and it has nothing to do with Roots OR WooCommerce.
For whomever is looking at this later, I will explain the problem.

I had a Plugin called ‘WooCommerce Views’
The plugin is designed to integrate the WP-Types Toolset into WooCommerce.

The default option for this is “WooCommerce Plugin Default Templates”

However, this option does not follow WooCommerce’s Override system.
It Overrides the Override system and will always display the default WooCommerce templates.

I will be posting this on Toolset’s forum for review.

1 Like

Thanks for posting the issue. I was about to post that I didn’t have issues within the last couple months, but wasn’t sure where to go with it after that. Glad you found the problem :slight_smile: