We are currently developing a new WooCommerce theme based on Sage 9.
We always use hooks to change the WooCommerce pages. We use a separate php file in (located in /app
) to keep everything tidy. Right now I want to add a partial to the single product page. We haven’t figured out a way to include a blade file.
We tried it with the following code, but also with require_once
and include
. However, the result is that the blade is spit out as text.
add_action('woocommerce_after_single_product', function() { get_template_part( 'partials/section', 'awards.blade' ); }, 10);
Any ideas how to tackle this?