How to Supply Console Logs Data into the WooCommerce Cart?
-
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 redirecting to their website 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); });
All the products are published as a WooCommerce simple product
Can you please help me how I can supply console logs data such as Title & Price into WooCommerce cart when someone click on third party button get title & price and supply in default WooCommerce function? I want to make third party book now button as a Add to Cart button so it’ll take title & price only.
If you have any question please let me know.
- The topic ‘How to Supply Console Logs Data into the WooCommerce Cart?’ is closed to new replies.