posted 4 years ago
I am using the attached script, which is PHP and jQuery (with some AJAX mixed in for good measure), and is used in connection with WordPress/Woocommerce to add a checkout field to the checkout form that, when checked, will add the associated product to the customer's current order, using the product's ID.
I would like to understand better how this script works. That is, I would like each function explained in layman's terms, because I would like to modify to the script to work with multiple checkboxes and multiple products. (For the record: I made the mistake of heading over to Stack Overflow, forgetting how ego-maniacal and rude most of them are over there. Yikes! I've always had much more pleasant experiences here on the ranch. So, thanks y'all!)