Reputation: 430
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 understand why it isn't working. I'm using twenty seven theme.
Any help will be appreciated.
Upvotes: 6
Views: 26894
Reputation: 1
After you've made the updates to the templates, try Clearing transients in Woocommerce/Status/Tools
WooCommerce transients This tool will clear the product/shop transients cache.
Upvotes: 0
Reputation: 11
FYI, to anyone for whom these solutions didn't work - my issue was that although my child theme (Velux) didn't have a woocommerce.php file in it, my parent theme (Primer) had a woocommerce.php in wp-content/themes/primer/inc/compat. I'm not sure what was in it that was conflicting, but when I replaced it with a blank woocommerce.php file (deleting it gave me a critical error), my overrides started working.
Upvotes: 1
Reputation: 21
I had this issue too.
Clear cache, then just swap/activate themes to a wordpress standard theme, then swap back to yours. Happy Days!
Upvotes: 2
Reputation: 4204
I had an issue with this relating to the WooCommerce template cache.
The cache can be cleared by navigating to:
WooCommerce > Status > Tools > Clear template cache
Upvotes: 18
Reputation: 468
I'm facing the same issue. I am using the JupiterX theme with Elementor and trying to override the checkout template in the JupiterX Child theme, but it's not loading. I have double checked the path, it's like themes/jupiterx-child/woocommerce/checkout/form-checkout.php
.
Solution:
I have resolved the issue. Actually, the JupiterX theme has its own WooCommerce overriding structure, that is themes/jupiterx/lib/templates/woocommerce/checkout/form-checkout.php
and the same for the child theme that is themes/jupiterx-child/lib/templates/woocommerce/checkout/form-checkout.php
.
For more details: themes.artbees.net/docs/overriding-woocommerce-templates
Upvotes: 2
Reputation: 51
Yes i agree with Mobashir. There are three steps to check why override not working :
Upvotes: 1
Reputation: 81
Try to declare Woocommerce support in your theme's function.php
Upvotes: 8
Reputation: 430
After lots of researching, finally I've found my answer from here WordPress - Failing to override woocommerce templates
Actually, I use all of my files inside the template folder and this is the reason why it didn't work.
So simple steps. But I can't understand how was I miss it!
Thank's Mo'men Mohamed for your suggetions.
Upvotes: 7
Reputation: 1909
If you've already read this documents https://docs.woothemes.com/document/template-structure/
Please Note: When creating woocommerce.php in your theme’s folder, you will be unable to override the woocommerce/archive-product.php custom template in your theme, as woocommerce.php has priority over all other template files. This is intended to prevent display issues.
Also make sure that you don’t have “Template Debug Mode” activated that you can find under:
WP Dashboard -> WooCommerce -> System Status -> Tools
Upvotes: 7