I am using HivePress Bookings and want to give customers a 10% discount if they book for 3 or more days. I also use the plugin “Currency Switcher for WooCommerce” (by WP Wham) so people can switch between my local currency and USD.
The discount works perfectly in my local currency. But whenever a user switches the currency to USD, the discount disappears entirely.
I already tried writing a code snippet using the hivepress/v1/models/booking/calculate_price hook to force the discount, but it gets ignored when switching currencies.
Could someone please help me or share a code snippet that tells HivePress and the currency plugin to calculate this 10% discount together correctly while using multi currencies?
Unfortunately, we can’t guarantee compatibility with all currency switchers yet, but I recommend trying a different one – please let me know if the issue persists YayCurrency – WooCommerce Multi-Currency Switcher – WordPress plugin | WordPress.org Resolving the issue with WP Wham requires developer information, for example, which hooks they use to change the currency in WooCommerce cart/checkout.
Please also note that the hook you mentioned doesn’t exist in Bookings, if you’d like to alter the way prices are calculated please try this one instead: hivepress/v1/models/listing/cart It’s used when the booking price is calculated, and on the checkout page.
Hope this helps
P.S. Please consider renewing support for Bookings or Marketplace if you still need assistance Renew Support | HivePress This also helps us continue development while keeping lifetime licenses available.