The WooCommerce template files are different from the WordPress Template files look at this to see how it works and the template file for shop pages is archive-product.php

Usually, all themes provide a separate sidebar area for the shop page, did you check if your theme is compatible with WooCommerce?
If yes then you should have a sidebar available under Appearance->Widgets with name similar to 'Shop Sidebar'

How to override a template?

To override the shop page,
copy: wp-content/plugins/woocommerce/templates/archive-product.php
to wp-content/themes/your_theme_name/woocommerce/archive-product.php

and then make the necessary changes to the template in your themes folder.

What happens is WooCommerce checks for the archive-product.php file in theme directory first and if it finds a file in woocommerce/ directory then it will use that file instead of the default one.
So now you have to edit the file inside your_theme_folder/woocommerce to make any changes.

Answer from user6552940 on Stack Exchange
🌐
WooCommerce Developer
developer.woocommerce.com › classic theme development › template structure & overriding templates via a theme
Template structure & Overriding templates via a theme | WooCommerce developer docs
1 week ago - With storefront-child in place, edits can be made in an upgrade-safe way by using overrides. Copy the template into a directory within your child theme named /storefront-child/woocommerce/ keeping the same file structure but removing the /templates/ subdirectory.
🌐
WooCommerce
woocommerce.com › document › saved-addresses-for-woocommerce › how-to-override-templates
How to override templates documentation - WooCommerce
February 24, 2025 - Copy the template into a directory within your active theme named /woocommerce keeping the same file structure but removing the /templates/ subdirectory. ... To override the address display template, copy: /wp-content/plugins/saved-addresse...
Discussions

wordpress - Woocommerce template overriding not working - Stack Overflow
I want to override woocommerce templates from my theme. I follow all the steps from the official documents of woocommerce. And I'm sure that there is no woocommerce.php file in my theme. So, I can;t More on stackoverflow.com
🌐 stackoverflow.com
WooCommerce Cart Template Override Not Working
It looks like you're on the right track, but here are a few things to check. First, make sure your theme supports WooCommerce by adding this to your functions.php: add_theme_support( 'woocommerce' ); Then, ensure your template is in the right folder: wp-content/themes/your-theme/woocommerce/cart/cart.php. If it's still not working, clear all caches and check if a plugin or caching issue is causing the problem. More on reddit.com
🌐 r/Wordpress
7
2
March 7, 2025
Sage 10 - Override default woocommerce templates
Hi, I have problems overriding the default woocommerce templates in sage 10. I’ve tried placing it directly into theme folder and also in resources/views/woocommerce, but none of the are working. Do you have any experience with this problem? Thank you More on discourse.roots.io
🌐 discourse.roots.io
1
0
June 29, 2020
Overwriting WooCommerce templates
Avoid overwriting templates whenever possible. Using hooks is much better from a maintenance standpoint. If you must override a template, try to use as much of the original template as you can. Leave comments that indicate where you modified the template & why. This will make it easier to maintain later. More on reddit.com
🌐 r/ProWordPress
11
7
March 5, 2021
Top answer
1 of 3
17

The WooCommerce template files are different from the WordPress Template files look at this to see how it works and the template file for shop pages is archive-product.php

Usually, all themes provide a separate sidebar area for the shop page, did you check if your theme is compatible with WooCommerce?
If yes then you should have a sidebar available under Appearance->Widgets with name similar to 'Shop Sidebar'

How to override a template?

To override the shop page,
copy: wp-content/plugins/woocommerce/templates/archive-product.php
to wp-content/themes/your_theme_name/woocommerce/archive-product.php

and then make the necessary changes to the template in your themes folder.

What happens is WooCommerce checks for the archive-product.php file in theme directory first and if it finds a file in woocommerce/ directory then it will use that file instead of the default one.
So now you have to edit the file inside your_theme_folder/woocommerce to make any changes.

2 of 3
11

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.

Declaring WooCommerce support is straightforward and involves adding one function in your theme's functions.php file.

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

Now override the template file copy: wp-content/plugins/woocommerce/templates/archive-product.php to wp-content/themes/your_theme_name/woocommerce/archive-product.php

🌐
WordPress
wordpress.org › support › topic › overriding-woocommerce-files-problem
Overriding woocommerce files problem | WordPress.org
February 29, 2024 - For example, if you want to override the single product page, copy the “single-product.php” file from “plugins/woocommerce/templates” to “themes/your-theme/woocommerce”. Then, make your modifications in the copied file.
🌐
WooCommerce
woocommerce.com › documentation › store design › woocommerce store editing › templates
Templates Documentation - WooCommerce
February 25, 2025 - Developers: If you’d like to override the default WooCommerce block templates in your custom block theme, please place your customized versions of these templates within your theme’s /templates directory. Review the WooCommerce block template files in GitHub.
🌐
WPVibes
wpvibes.com › home › a simple guide to override woocommerce templates
How to Override WooCommerce Templates Complete Guide
June 30, 2025 - Learn how to override WooCommerce templates using a child theme. This beginner-friendly guide shows you how to safely customize WooCommerce templates.
🌐
Reddit
reddit.com › r/wordpress › woocommerce cart template override not working
r/Wordpress on Reddit: WooCommerce Cart Template Override Not Working
March 7, 2025 -

[SOLVED]

I’m trying to override the WooCommerce cart template (cart/cart.php) in my custom theme, but it’s not working. I’ve placed the override file in the correct location:
wp-content/themes/your-theme/woocommerce/cart/cart.php

I even replaced the original WooCommerce cart template (wp-content/plugins/woocommerce/templates/cart/cart.php) with my custom code, but it still doesn’t work. The cart page continues to load the default template.

What I’ve Tried:

  1. Cleared all caches (browser, plugin, server).

  2. I added this: add_theme_support( 'woocommerce' );

Can someone plz help me figure out why the override isn’t working? I’ve followed all the standard steps, but nothing seems to work. I am also using underscores to build upon if that might help and I highly suspect this is the cause.

Solution

To fix this, you need to disable the block-based cart system and revert to the legacy cart system. Here’s how:

Step 1: Disable the Block-Based Cart

Add the following code to your theme’s functions.php file:

To fix this, you need to disable the block-based cart system and revert to the legacy cart system. Here’s how:

// Disable block-based cart
add_filter('woocommerce_blocks_enable_cart', '__return_false');

This forces WooCommerce to use the legacy cart system, which respects the cart/cart.php template override.

Step 2: Recreate the Cart Page

  1. Go to PagesCart in your WordPress dashboard.

  2. Delete all the existing content (blocks).

  3. Add the [woocommerce_cart] shortcode:plaintextCopy[woocommerce_cart]

  4. Click Update to save the page.

Find elsewhere
🌐
WPMozo
wpmozo.com › home › blog › how to override woocommerce templates in your wordpress child theme
How to Override WooCommerce Templates in Your WordPress Child Theme
September 17, 2025 - The default WooCommerce templates are in the WooCommerce plugin directory under wp-content/plugins/woocommerce/templates/. These templates control various parts of your WooCommerce store, like product, cart, and checkout pages. To override a template, create a woocommerce folder in your Child Theme’s directory.
🌐
QuadLayers
quadlayers.com › home › blog › how to customize woocommerce templates
How to Customize WooCommerce Templates - QuadLayers
August 28, 2021 - Looking for ways to edit your templates? In this guide, we’ll show you two different methods to customize WooCommerce templates […]
🌐
Business Bloomer
businessbloomer.com › home › woocommerce blog › woocommerce: disable theme’s woocommerce template overrides
WooCommerce: Disable Theme's WooCommerce Template Overrides
September 27, 2022 - Unfortunately, this theme comes with a /woocommerce folder, which means theme developers completely override WooCommerce template files by copying them to the folder, and customizing each of them by hand to match their design and functionality needs.
🌐
Mikey Arce
mikeyarce.com › 2024 › 10 › how-to-override-woocommerce-templates-with-examples
How to Override WooCommerce Templates – with examples!
April 12, 2025 - If I want to override the template located in: /plugins/woocommerce/templates/checkout/thankyou.php I would copy that file and place it into: /themes/MY_THEME/woocommerce/checkout/thankyou.php
🌐
Users Insights
usersinsights.com › home › overriding the woocommerce template files: step by step guide
Overriding the WooCommerce template files: Step by step guide - Users Insights
July 22, 2024 - To make things easier, copy the files from /wp-content/plugins/woocommerce/templates into wp-content/themes/mytheme/woocommerce. But you should really just copy the files you need. Otherwise, if you add unnecessary files, you lose track of your customizations.
🌐
GoDaddy
godaddy.com › resources › skills › commerce › how to override woocommerce template files and woocommerce extensions
How to Override WooCommerce Template Files and WooCommerce extensions - GoDaddy Blog
April 16, 2024 - However, sometimes a hook you need doesn’t exist, and overriding a template would be the only option to use (though suggesting this hook would be a great idea). To override WooCommerce template files in your theme (or better yet, child theme) simply make a folder named ‘woocommerce’ within your theme directory, and then create the folders/template file you wish to override within it.
🌐
WooCommerce
woocommerce.com › affiliate for woocommerce › how to override templates
How to override templates in the plugin - WooCommerce
February 20, 2025 - ... To override and customize any template, copy the file and put it inside the wp-content/themes/{your-active-theme}/woocommerce/affiliate-for-woocommerce/ directory keeping the same directory structure but removing the templates subdirectory, ...
🌐
WisdmLabs
wisdmlabs.com › home › wordpress tips & tricks › how to override woocommerce templates in your plugin
How to Override WooCommerce Templates in your Plugin
August 27, 2024 - This post explains how to override woocommerce templates in your plugin. With this you can suppress default templates and display your customized template.
🌐
WPDevDesign
wpdevdesign.com › how-to-override-woocommerce-templates-using-a-custom-functionality-plugin
How to override WooCommerce templates using a custom functionality plugin
May 16, 2019 - */ function intercept_wc_template( $template, $template_name, $template_path ) { if ( 'cart.php' === basename( $template ) ) { $template = trailingslashit( plugin_dir_path( __FILE__ ) ) . 'woocommerce/cart/cart.php'; } elseif ( 'form-billing.php' === basename( $template ) ) { $template = trailingslashit( plugin_dir_path( __FILE__ ) ) . 'woocommerce/checkout/form-billing.php'; } return $template; } Here we are overriding cart.php and form-billing.php.
🌐
WPXPO
wpxpo.com › override-woocommerce-template
Override WooCommerce Template in Child Theme and Plugin
May 12, 2025 - Learn how to safely override WooCommerce templates using a child theme, direct plugin modification, or the WowStore plugin for complete customization.
🌐
Reddit
reddit.com › r/prowordpress › overwriting woocommerce templates
r/ProWordPress on Reddit: Overwriting WooCommerce templates
March 5, 2021 -

Hey folks,

I’m writing a new WooCommerce site from scratch, and I’m faced with making changes to the WC templates.

Part of me, wants to make heavy modifications to all the templates (in my theme folder), since my client wants these to look a certain way - but part of me also suspects, that this might end up being a maintenance nightmare.

I am essentially just thinking about changing the markup here and there. I understand that messing with the logic of these templates, is a bad idea, mostly.

Does anyone have any experiences to share regarding this? Is it likely, that I will end up spending a bunch of time on maintenance in the future, if I do this?