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.
Open
Last updated: February 7, 2019
Log in to comment on this feature request.
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.