Home Forums WoodMart support forum Currency

Currency

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #384351

    ICONS
    Participant

    Hi,

    I am trying to show currency symbols only in the cart but not in the shop pages. Works fine with this code:

    // Remove all currency symbols
    function sww_remove_wc_currency_symbols( $currency_symbol, $currency ) {
    if ( is_shop() || is_product() || is_product_category() || is_product_tag() )
    $currency_symbol = ”;
    return $currency_symbol;
    }
    add_filter(‘woocommerce_currency_symbol’, ‘sww_remove_wc_currency_symbols’, 10, 2);

    However, the homepage is using the Woodmart widgets and I am wondering how to ‘call’ those with an ‘is_’ hook (if even possible). Do you know by any chance if I can do this?

    Thanks,
    Ruben

    #384471

    Hello,

    Our support does not cover the investigation and fixing third parties code as well as customization of the Wooommerce. You would better find a developer or a plugin for this purpose.

    If you have any questions please feel free to contact us.

    Best Regards

    #384764

    ICONS
    Participant

    Hi Elise,

    Actually my question is not about third party coding or WooCommerce, its about a Woodmart widget. My question was if the Woodmart widget (products tab) also has a hook that I can use.

    #385051

    Hello,

    Please add this code to the functions.php to the child theme:

    if ( ! function_exists( 'sww_remove_wc_currency_symbols' ) ) {
    	function sww_remove_wc_currency_symbols( $currency_symbol, $currency ) {
    		if ( is_cart() || is_admin() ) {
    			return $currency_symbol;
    		}
    
    		return '';
    	}
    
    	add_filter( 'woocommerce_currency_symbol', 'sww_remove_wc_currency_symbols', 10, 2 );
    }

    If you have any questions please feel free to contact us.

    Best Regards

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