• Resolved eilidhn

    (@eilidhn)


    Is there any way to hide the decimal value from the amount in the basket?

    Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @eilidhn

    Please add the code snippet below to your theme functions.php file:

    add_filter( 'wpmenucart_menu_item_data', function( $menu_item ) {
    	if( isset( $menu_item['cart_total'] ) ) {
    		$arr = explode( ',', $menu_item['cart_total'] );
    		$menu_item['cart_total'] = $arr[0];
    	}
    	return $menu_item;
    }, 10, 1 );

    If you never worked with actions/filters please read this documentation page: How to use filters

Viewing 1 replies (of 1 total)
  • The topic ‘Decimal Value’ is closed to new replies.