Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extend woocommerce plugin

I have wordpress child theme, and in it I can extend woocommerce by creating folder of following structure:

/wp-content/themes/theme-child/woocommerce/single-product/add-to-cart/*.php

But the problem is that I wan't to extend something located in

/wp-content/plugins/woocommerce-plugin/templates/single-product/add-to-cart/*.php

By first approach I can override woocommerce files, but how do I do it for woocommerce-plugin?

like image 266
Jack Daniels Avatar asked Mar 23 '26 06:03

Jack Daniels


1 Answers

To override woocommerce templates without changing anything in woocommerce plugin folder, you need to copy entire templates folder (located in woocommerce plugin) to your active child theme folder and rename it woocommerce (see here). Like this the active woocommerce templates are now in your child theme folder and you can customize them…

like image 72
LoicTheAztec Avatar answered Mar 24 '26 19:03

LoicTheAztec



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!