PPOM and WooCommerce Bookings

WooCommerce Booking plugin changes prices based on date/reservation set by admin. Whereas PPOM use WooCommerce use product base price to calculate product total. Following link script will handle WooCommerce Booking price and show correct total in PPOM price table.

JS Script

jQuery.fn.ignore = function(sel){
  return this.clone().find(sel||">*").remove().end();

jQuery(document).on('wc_booking_form_changed', function(e){
var wc_book_price = jQuery(".wc-bookings-booking-cost .woocommerce-Price-amount").ignore('.woocommerce-Price-currencySymbol').html();
ppom_product_base_price = wc_book_price ;

Where to add this code?

This code can be added on theme script file or anywhere in footer tag. Mostly theme allow to add custom JS.