diff --git a/your-sage-theme/app/filters.php b/your-sage-theme/app/filters.php index a6d2a5a..3db863f 100644 --- a/your-sage-theme/app/filters.php +++ b/your-sage-theme/app/filters.php @@ -29,12 +29,11 @@ /** * Render page using Blade * 19.25.18: tested and required for Woocommerce 3.3.5 integration with sage 9.0.1 - * * Changed: locate blade or php template file and render it * Triggers just before woocommerce actually render PHP template, but return blade and null, or php template like woocommerce would do * wp-content/plugins/woocommerce/includes/wc-core-functions.php:l158 */ -add_filter( 'wc_get_template_part', function ( $template, $slug, $name, $args ) { +add_filter( 'wc_get_template_part', function ( $template, $slug, $name, $args = [] ) { $bladeTemplate = false; // Look in yourtheme/slug-name.blade.php and yourtheme/woocommerce/slug-name.blade.php if ( $name && ! WC_TEMPLATE_DEBUG_MODE ) { @@ -46,6 +45,7 @@ } if ( $bladeTemplate ) { echo template( $bladeTemplate, $args ); + return null; } //try to look for PHP files within resources/views/woocommerce