Mobile App Refresh Campaign [Banner] 2024

Product Icon

Product Add-Ons

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

Add Filter before displaying prices (to allow hiding prices)

I need to hide prices for some countries in the front-end. In Woocommerce I just add a filter like add_filter(‘woocommerce_get_price_html’, ‘do_stuff’) and in do_stuff I check if the user country is a pre-defined blacklisted country and if so, I return ” so that the price won’t be displayed. Works just fine.

In Product Add-Ons Plugin there is no filter before the price is displayed in the frontend so I have to use CSS to hide the prices there which is not the best solution.

I understand that the Add-On prices are not only displayed via PHP but can also change via JavaScript by the plugin. So this whole approach would be in for revision and should possibly be changed in order to get more control over what is actually displayed to the user.


Current Status


Last updated: February 7, 2019

1 comment

Log in to comment on this feature request.

  1. Anonymous says:

    We have a related case.
    Adding more markup to make the shop multi-currency. Using the wc_price filter we are able to do that around Woo and Woo Bookings.

    Products Add-On Plugin runs the whole sub-total calculation in JS. Would be great if the add-ons cost/subtotal would be fetched like the bookings cost via AJAX to allow modification.