Template overwrites via custom plugin?

[ad_1]

Hi @bwph

The function wc_braintree_get_template that is called for all Braintree plugin tempaltes is just a wrapper for the WooCommerce function wc_get_template.

The wc_get_template function has a filter of the same name that can be used to provide a custom location for the Braintree plugin’s templates.

That filter is located in the woocommerce/includes/wc-core-functions.php file.

Kind Regards,

Thread Starter
bwph

(@bwph)

Hi @mrclayton,

thank you for your quick answer!

We have set a custom template location for Woocommerce by adding a filter to woocommerce_locate_template() which is called in wc_get_template(), so it should be as easy as adding the plugin’s templates next to the already existing Woocommerce templates inside our functionality plugin.

Kind Regards!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer