I may be wrong on this, but I don't think the {{if}}
directive works with conditions like varName == "varValue"
.
I wasn't able to find int he core any use like this.
I think it only works with
{{if varName}}
text shown when varName evaluates to true
{{else}}
text shown when varName evaluates to false
{{/if}}
You can check how everything works, but debugging the method \Magento\Framework\Filter\Template::ifDirective
.
But I may have a solution for your problem.
I assume the helper
variable is something custom that you can control.
You can get rid of the if
directive, but doing the checks in your helper class.
Here is an example:
public function getShippingDescriptionMessage($order)
{
$description = $order->getShippingDescription();
if ($description === 'abcd' || $description === 'dede') {
return __('abcd & dede');
}
return __('Not abcd & dede');
}
then replace your whole {{if}}{{else}}{{/if}}
directive with
{{var helper.getShippingDescriptionMessage($order)}}
Note: Haven't tested this. But it looks like it may work