Please consider leaving a donation if you appreciate this information. Lightning network now available
Perhaps you are using the woocommerce_price_trim_zeros as suggested in this thread: https://wordpress.org/support/topic/about-price-displaying/ and you have noticed that filter has no effect on product addon price displays. This is due to an unresolved issue with the accounting.js library here: https://github.com/openexchangerates/accounting.js/issues/93
There is a workaround, however. The workaround requires a bit of JavaScript trickery to achieve. Fortunately, Product Addons has a custom event registered named updated_addons so some custom JavaScript can be created to trim the trailing zeros when that event is triggered. The JavaScript would look something like this:
If you’re unclear on how to get that bit of JavaScript loaded on your site, this can be done with the WordPress beardedguy_enqueue_script() function. And if that still isn’t clear, I have created a very basic plugin that can serve as an example. Click here to download.
Please consider leaving a donation if you appreciate this information. Lightning network now available
dezinezone says
Hello This plugin and piece of script no longer work. Do you have an updated script or plugin that would work on newer versions?
Thank you in advance for a response.
DeZineZone