-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
I tried this syntax while creating a hook :
sylius_twig_hooks:
hooks:
'sylius_shop.base.header.top_bar':
my_hook:
template: '/shop/my_hook.html.twig'
priority: 0
enabled: '%env(bool:ENABLE_MY_HOOK)%'The hook is always enabled, even if the env var ENABLE_MY_HOOK is false.
I tried also to define a parameter like this
parameters:
app.enable_my_hook: '%env(bool:ENABLE_MY_HOOK)%'And used it in the hook declaration :
sylius_twig_hooks:
hooks:
'sylius_shop.base.header.top_bar':
my_hook:
template: '/shop/my_hook.html.twig'
priority: 0
enabled: '%app.enable_my_hook%'This feature flag worked when we used Sylius UI twig events in Sylius 1.x
rey0bs, pjedrzejewski and shochdoerfer