This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Recursively adds each product in the array to the cart as WooCommerce cannot handle more than 1 request at a time | |
| // (will need to create an array for this to work) | |
| function addItemsToCart() { | |
| var buttonTarget = $(".add-multiple-to-cart"); | |
| if (productsToAdd.length > 0) { | |
| var product = productsToAdd.shift(); | |
| var url = '?add-to-cart=' + product.product_id + '&quantity=' + product.quantity; | |
| $.post(url, function() { |
NewerOlder