Version: v5.11.10
Environment: Docker
Hi,
I’ve noticed an issue with conditional sections in custom templates in version v5.11.10. Specifically, the CSS display
property for sections controlled by variables like $invoice.custom4
doesn’t seem to be applied properly, even though the value of $invoice.custom4
is correctly replaced.
This worked fine in version v5.11.7, but now the section always displays regardless of the condition. It seems like the CSS or JavaScript logic isn’t being executed correctly.
Example:
javascript
const shouldDisplay = "$invoice.custom4" === "yes";
if (shouldDisplay) {
section.style.display = "block";
} else {
section.style.display = "none";
}
Even when $invoice.custom4
is "no"
, the section is still visible.
Expected Behavior:
The section should only be visible when $invoice.custom4 === "yes"
.
Has anyone else encountered this? Could something have changed in how the CSS or JavaScript is processed in v5.11.10?
Thanks for your help!