• Resolved simonbrandstrom

    (@simonbrandstrom)


    Hey!
    My costumer has problems to remove the decimals on here price. Now it stands 699,00 SEK but she wont it to be 699 SEK. I have tried to fix it in the settings on WooCommerce. And there change it to “0” but nothing change.

    Do we make something wrong or is it a bug?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try this snippet:

    // WooCommerce - remove cents
    add_filter( 'wc_price', 'my_price', 3, 60 );
    function my_price( $return, $price, $args ) {
      $price = str_replace( ',', '', $price );
      return intval( $price ).' SEK';
    }

    Goes in functions.php for your child theme or you can try a snippets plugin.

    Plugin Support Missy a11n

    (@m155y5)

    Automattic Happiness Engineer

    Hi @simonbrandstrom

    Lorro offered a good suggestion and because we haven’t heard back from you in a while, I’m going to go ahead and mark this thread as resolved. If you have any other questions please feel free to start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with decimal’ is closed to new replies.