WooCommerce Template Overrides Not Working

This is a quick one that I recently spent a few minutes scratching my head over. I am working on a WooCommerce store and copied the template files over to begin customising them. When I uploaded the new templates to override WooCommerce’s default files, nothing happened.

My WooCommerce template directory path was correct and everything seemed fine, so after a few minutes of googling it seems WooCommerce now requires developers to add WooCommerce theme support.

If you are using custom WooCommerce template overrides in your theme you need to declare WooCommerce support using the add_theme_support function. WooCommerce template overrides are only enabled on themes that declare WooCommerce support. If you do not declare WooCommerce support in your theme, WooCommerce will assume the theme is not designed for WooCommerce compatibility and will use shortcode-based unsupported theme rendering to display the shop.

After adding the below code into my functions.php file everything works fine and my new template files are showing.

function add_support() 
{
   add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'add_support' );

You can reply to this post by tweeting to me