Thread Starter
seekon
(@seekon)
Hello,
I’m using the free version of the plugin and the tab hook is called nonetheless.
Because the tab filter hook, when used by free users, always returns nothing (instead of returning non-modified $tabs[] parameter), the free users are the ones mostly getting this bug if using another plugin that also uses ‘woocommerce_product_tabs’ hook.
In my case, the hook receives an array parameter with 2 array objects, ‘Description’ and ‘Additional Information’ and after the UFaq hook is run in the free version, a silent error notice is given that the return should not be an empty non array and discards the function.
But If there is another filter call after UFaq hook, then UFaq hook passes nothing to that next filter call and that one properly returns what it got + another created tab, the end result is $tabs array only having tab objects after UFaq hook.
In short: the filters should always return whatever they received if they don’t make any changes but in this case it returns nothing.