Asperger
Asperger

Reputation: 3222

Woocommerce template not overriding

I am trying to override a woocommerce plugin but somehow it wont work. In my custom theme I added the following in functions.php

function add_theme_wc_support() {
    add_theme_support('woocommerce');
    add_theme_support('woocommerce-composite-products');
}

add_action('after_setup_theme', 'add_theme_wc_support');

The directory for my template:

theme\templates\woocommerce-composite-products\single-product\template-file.php

I edited the template but nothing happened. I also tried to change the folder "woocommerce-composite-products" to just "woocommerce" but nothing.

My functions.php only contains the "add_theme_wc_support" function, so there cant be any conflicts.

How can I make this work?

Upvotes: 0

Views: 970

Answers (2)

Samyappa
Samyappa

Reputation: 531

If need to overwrite woocommerce functionality, You have to create woocommerce folder in your active theme and duplicate the file.

Ex:

Your Theme is Twentytwenty you have to do themes/twentytwenty/woocommerce/emails/admin-new-order.php

Upvotes: 0

Buttered_Toast
Buttered_Toast

Reputation: 991

Going by the comment you provided about how the plugin wants you to override the template your file path should look like this

enter image description here

Upvotes: 1

Related Questions