Advance Uses
Overriding Woocommerce templates via a theme
WooCommerce template files contain the markup and structure for your store's frontend and HTML emails.
These files include hooks that let you add or move content without editing the template files directly, protecting against upgrade issues by keeping the template files untouched.
You can find the template files in the /woocommerce/templates/ directory.
How to Edit Files
To edit WooCommerce template files in an upgrade-safe way, use overrides. Follow these steps:
- Copy the template into a directory within your theme named /woocommerce, maintaining the same file structure but removing the /templates/ subdirectory.
- Example: To override the archive page, copy:
wp-content/themes/yourtheme/woocommerce/archive-product.php - The copied file will now override the WooCommerce default template file.
- Open the copied
archive-product.phpfile and edit it. - Delete the
woocommerce_shop_loopand paste your table shortcode in its place.
Example
echo do_shortcode("[Product_Table id='104' name='test']");

