I am using the third party gadget where they are providing live availability, cost and book now button. When customer click on book now button, it's using their booking gadget which I want to ignore.
After doing some google research, I am able to get correct Title & cost under console logs when some is clicking on the book now button.
$w.event.subscribe("item.book.click", function(item) {
console.log(item);
console.log("Title " + item[3].Name + " (Date " + item[4].date + ", Period " + item[4].period + ", Adults " + item[4].adults + ", Children " + item[4].children + ", Infants " + item[4].infants + ")");
console.log("Price " + item[3].Availability.Cost);
});
WooCommerce simple product Live Demo: http://plugin.seminyak.holiday/product/the-layar/#/accom/66268
Click on Book Now button and see console log it's returning value of Title & Price but how to trigger console data value in pop up buttons like BUY NOW & ADD ITEM TO CART.
When user click on ADD ITEM TO CART it'll add data into /cart page + basket and If someone click on BUY NOW button it'll take data and redirect user on /checkout page with console Title and Price
If you have any question please let me know.