How to override WooCommerce template files

How to override WooCommerce template files

You can edit these files in an upgrade-safe way using overrides.

  1. Templates files can be found within the /wp-content/plugins/woocommerce/templates/ directory.
  2. Copy the needed file into the directory within your theme named woocommerce (create if it does not exist), keeping the same file structure but removing the templates subdirectory.
  3. For example, if you need to overwrite file /wp-content/plugins/woocommerce/templates/archive-product.php, copy this file to/themes/themexxxx/woocommerce folder.
  4. The copied file will now override the WooCommerce default template file.
  5. Do not edit these files within the core plugin itself as they are overwritten during the upgrade process and any customizations will be lost.

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.