Would it be possible for 1 of 2 things to happen (or both)?
Would it be possible to include the product add-ons on RentalHive in the Sub-total? It’s being added afterwards and this is preventing me from adding a custom service fee. I have the PHP and its added my Service Charge, but it isn’t including the product add-ons.
The code I need to call the product add-ons and add it into my calculation for calculating the service fee?
Hopefully that’s possible. No matter what way I’ve tried to add the cart totals, it will not include the product add-on.
Happy to include the PHP.
And I guess a 3rd thing, how can I add my PHP so it won’t be erased when I update a plug-in? It’s currently sitting in /theme/rentalhive/function.php
Please clarify which pricing extras you mean, with Bookings there are a few types of them (per day, per place per day, per booking, per place…). Those that are per-booking (so added to the payment total regardless of the number of days, time slots or places, they are just fixed fees per booking) may not be included to the tax calculation base, but we’re working on this to add more control over this.
If you keep all the code snippets outside the theme/plugin folder (e.g. via the Code Snippets plugin, or via Appearance/Customize/Additional CSS for CSS snippets), or override template parts via a child theme (without direct changes in the main theme files) then any customizations will be safe from updates.
Right, these are applied per booking regardless of days, the fee is a fixed price - example, Delivery Fee = $100, regardless of number of days the booking is for.
I’ve tried searching the theme for any add_action or add_filter’s that affect the Woocommerce cart total and can’t find it. Does the RentalHive theme or Booking extensions modify that part of the calculation?
As I originally stated, if there’s a hook or filter for the price-extras or that is affecting the way the total is being calculated, I think I could use that in my custom PHP to add a custom service fee.
I’m trying to figure this out, so hopefully this makes sense. Thanks for your attention on this matter!
Thank you, @ihor! I’ll try to figure out where and how to implement that code. I wouldn’t say I’m familiar, but I am trying to figure this out so we can launch our business.