Formatting product prices in email orders

by YeshDev   Last Updated June 30, 2020 01:08 AM - source

I’m trying to format prices in case of Indian Rupees. Below is my code and it works in case of email order on hold but how to make it work in case of order-complete?

   //Indian Currency Formatter
add_filter( 'formatted_woocommerce_price','ind_currency_formatter', 100, 1 );

    function ind_currency_formatter($price){
        global $user_currency;
            $price = preg_replace("/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/i", "$1,", str_replace( ',', '', $price ));
            return $price;
            return $price;

Related Questions

Put data in my-account/view-order/id/ page

Updated June 18, 2017 00:08 AM

Resend Order Confirmation Email Button

Updated October 30, 2017 12:08 PM