Disclaimer

This blog is kind of my own personal work Notebook, and the processes below are only guaranteed to work for my specific configurations. So, use this info at your own risk, and please understand I won't be able to provide any help if you break something

Sunday, June 14, 2015

Creating WooCommerce Template files in a Child Theme

You only need to copy over to your Child Theme the WooCommerce files that will be customized.
​Those files are located at:
​https://example.com/wp-content/plugins/woocommerce/templates/

​First you need to create a woocommerce directory in your child Theme named "woocommerce". In this folder you will store the customized WooCommerce template files.
https://example.com/wp-content/themes/example-child/woocommerce/

So, for example, if you want to customize this file:
https://example.com/wp-content/plugins/woocommerce/templates/single-product/add-to-cart/external.php

You will need to create the directory and place that file in your child Theme folder so that you will have this:
https://example.com/wp-content/themes/example-child/woocommerce/single-product/add-to-cart/external.php

​Now all the changes that you make to that file will override the original file at the plugin folder, and if you ever update WooCommerce the modifications will remain.

You will be able to know what files are overriding the original plugin files by going to:
https://example.com/wp-admin/admin.php?page=wc-status

Check Template Structure + overriding templates via a Theme for more info:


3 comments:

  1. You have very useful information in your blog about house remodeling. Thanks for sharing such nice information with important facts. Good wishes, from GrafWeb.

    ReplyDelete
  2. Sharing these links are very amazing and informative one. Thank you very much.

    Best web site developer | professional seo company in Dindigul

    ReplyDelete
  3. Thank you for sharing excellent information. Your website is very cool. Fully useful your blog post... Online shopping websites in india

    ReplyDelete