Each time a woocommerce template is loaded, all sage/template/{$class}/data filters get executed.
This affects also public non static methods of controllers as documented in this issue:
<?php
namespace App\Controllers;
use Sober\Controller\Controller;
class TaxonomyProduct_cat extends Controller
{
public function test()
{
echo 'a';
return '';
}
}
It seems related to woocommerce_before_template_part action.
Is there a fix or workaround for this?
Does Sage 10, and maybe this PR solve the issue?