Mailchimp Banner Promo Product Page | Q3 2024

added by Mahrie for July $1 promo - product page specific link to Mailchimp pricing

Klarna Payments Q3 2024 banner

Added by Russell Langley in Partner Marketing

Product Icon

Product Add-Ons for WooCommerce

by  Woo
Offer add-ons like gift wrapping, special messages or other special options for your products.

Remove cents on front end if there are none

I think people should be able to format the add-on prices on the front end. If an add on costs $5, i would rather it show $5 instead of $5.00. The extra .00 just takes up unnecessary space, especially when the website is scaled down for mobile responsiveness

Author

soluxelifestyle

Current Status

Closed

Last updated: April 19, 2023

1 comment

Log in to comment on this feature request.

  1. jaskyt8 says:
    Product Developer May 31, 2024 10:57 am

    Hey there,

    Thank you for reaching out!

    The number of decimals that show up in frontend prices is determined by the WooCommerce > Settings > General > Currency options > Number of decimals option: https://d.pr/i/aiYqht.

    If this is set to 2, then all prices in your store will show up with 2 digits. If a price is not a decimal, then 0 digits will be added instead. This also happens if you create a Simple Product and assign a non-decimal price to it.

    To remove trailing zeros from prices, you may use the following PHP snippet:

    add_filter( 'woocommerce_price_trim_zeros', '__return_true' );

    To install PHP snippets like the above, I recommend using the Code Snippets plugin: https://wordpress.org/plugins/code-snippets/