Override WooCommerce files from plugin

I want to display my custom template for Single Product i.e. single-product.php

For WordPress native templates, we can use add_filter( ‘single_template’, ‘custom_single_tmpl’ ); and a callback function looks like this:

public function custom_single_tmpl( $tempalte ) {
return PLUG_DIR_PATH . ‘/templates/custom-single.php’;
}

Is there any way to override WooCommerce template files like that?

Read more here:: Override WooCommerce files from plugin

Leave a Reply

Your email address will not be published. Required fields are marked *