• Resolved ihsan khan

    (@ihsankhan)


    Hello, I am using two currencies on my website, the US Dollar currency symbol is showing correctly in the invoice, but the Invoice for the UEA Dirham symbol is not showing,
    Need to fix this.

    here is the screenshot
    https://prnt.sc/1u4oejb
    Kindly help me in this regard.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! Can you try if enabling “extended currency support” in the General settings resolves the issue?

    Thread Starter ihsan khan

    (@ihsankhan)

    Hello Ewout, thank you for your response. Yes, I have already enabled this option, but still, the issue is still there.

    Looking forward to your response.
    I am attaching a screenshot in the link.
    https://prnt.sc/1u906fn

    Thank you

    Plugin Contributor Ewout

    (@pomegranate)

    I now realize that you wrote that you were having the issue with the UEA dirham currency. The reason we don’t support this is that RTL text direction is not supported by the library we use to create the PDF (dompdf). We are tracking this issue here.

    As a temporary solution you could add the following code snippet to your site:

    add_action( 'wpo_wcpdf_before_html', function ( $document_type, $document ) {
    	add_filter( 'woocommerce_currency_symbol','wpo_wcpdf_currency_symbol_text', 999, 2);
    }, 10, 2 );
    add_action( 'wpo_wcpdf_after_html', function ( $document_type, $document ) {
    	remove_filter( 'woocommerce_currency_symbol','wpo_wcpdf_currency_symbol_text', 999, 2);
    }, 10, 2 );
    function wpo_wcpdf_currency_symbol_text( $currency_symbol, $currency ) {
    	if ( in_array( $currency, [ 'AED', 'BHD', 'DZD', 'IQD', 'IRR', 'JOD', 'KWD', 'LBP', 'LYD', 'MAD', 'MVR', 'OMR', 'QAR', 'SAR', 'SYP', 'TND', 'YER' ] ) ) {
    		$currency_symbol = $currency;
    	}
    	return $currency_symbol;
    }

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Thread Starter ihsan khan

    (@ihsankhan)

    Thank you for the fast response mate.
    I have applied the above-mentioned method through the Code Snippet plugin, but the result is still the same.

    Screenshot of pdf invoice
    https://prnt.sc/1u9374v

    screenshot of orders page on my website.
    https://prnt.sc/1u93ak3

    what I need to do next?
    thanks

    Plugin Contributor Ewout

    (@pomegranate)

    It’s possible that your currency plugin is overriding the currency symbol change. Which plugin do you use to offer multiple currencies?

    Thread Starter ihsan khan

    (@ihsankhan)

    Booster plugin for the currency switching

    Thread Starter ihsan khan

    (@ihsankhan)

    Okay thank you, it works now, I have put the code through Function.php.

    Once again for the support, going to give 5 stars to your plugin.

    Plugin Contributor Ewout

    (@pomegranate)

    Unfortunately that plugin has coded their override in such a way that no other plugin can come after it (using PHP_INT_MAX). As a result, whatever you will try to do to print AED instead of ?.? will not work.

    The only option in this case is to either change it in the Booster settings directly (which will then appear like that other places on your site too – this may not be what you want), or contact the Booster developers to ask if they can lower the priority on their woocommerce_currency_symbol hook so that other plugins can still use that hook.

    Thread Starter ihsan khan

    (@ihsankhan)

    AED sign is fine for me, thank you again Ewout.

    Plugin Contributor Ewout

    (@pomegranate)

    Very glad to hear that, and thanks for the review!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Multiple Currency Symbol not showing’ is closed to new replies.