Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Custom string translation syntax PART 2

$
0
0

Replies: 0

Hi
I have a question similar to this
I managed to create a woocommerce filter in a code snippet with a custom string that is registered and translatable with Polylang, but when I add the pll_e() to the code, the text – although translated – is not placed correctly on frontend:

Using this code snippet, the “on backorder” text is placed BEFORE the item name, instead of after the name:

$item_name .='<br /><div class=”backorder”>’ .$backorder_qty. pll_e(‘on backorder’).'</div>’;

When I remove the pll_e(), the text displays correctly AFTER the item name, as it should:

$item_name .='<br /><div class=”backorder”>’ .$backorder_qty.” on backorder”.'</div>’;

Can you see what I do wrong when adding the pll_e() ?

Thank you


Viewing all articles
Browse latest Browse all 59525

Trending Articles