Home Forums WoodMart support forum currency cant get changed and keep switch back to arabic symbol

currency cant get changed and keep switch back to arabic symbol

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #716172

    iladam899
    Participant

    /**
    * Force MAD currency symbol to ‘DH’ and prevent translation overrides
    */
    add_filter(‘woocommerce_currency_symbol’, ‘force_mad_currency_symbol’, 99999, 2);
    function force_mad_currency_symbol( $currency_symbol, $currency ) {
    if ( ‘MAD’ === $currency ) {
    // We return the string directly to bypass translation files
    return ‘DH’;
    }
    return $currency_symbol;
    }

    // Ensure the symbol list is also updated for the backend/settings
    add_filter(‘woocommerce_currency_symbols’, ‘update_mad_symbols_list’, 99999);
    function update_mad_symbols_list( $symbols ) {
    $symbols[‘MAD’] = ‘DH’;
    return $symbols;
    }

    #716209

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Could you please check how it works with some default WordPress themes like TwentyTwenty or WooCommerce Storefront to understand if it is our theme issue or not?

    Best Regards,

Viewing 2 posts - 1 through 2 (of 2 total)