From dd6d16e7a79076dec913a1c479608a9adb059688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20L=C3=B8vgaard?= Date: Sun, 23 Aug 2026 15:00:56 +0200 Subject: [PATCH] Document how VAT context priorities interact with the toggler Custom contexts are tagged through autoconfiguration, which gives them priority 0. That is higher than both built-in contexts, so a context that always returns a value silently disables the toggler: the button still writes the cookie, but CookieBasedVatContext never gets asked. Document the ordering, list the built-in priorities, and show how to tag a context explicitly to sit below the customer's own choice. Also fixes 'with our without VAT' in the same paragraph. Claude-Session: https://claude.ai/code/session_01P9NzuVPQGvaVR97HZFq98a --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f951039..fa58cb6 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,50 @@ however, you can inject it yourself calling the Twig function `sstv_vat_toggler( ## VAT context The plugin uses the `Setono\SyliusToggleVatPlugin\Context\VatContextInterface` to deduce whether to show prices -with our without VAT. You can create your own VAT context by implementing that interface. +with or without VAT. You can create your own VAT context by implementing that interface: + +```php +