By submitting your email, you agree to opt-in to receive emails and exclusive offers from office@truemoola.com. We will never send you spam or sell your data. You can always remove your email from our contact list by unsubscribing.
Age Verification
You must be 21 years or older to enter this site.
jQuery(function($) {
let productID = $('form.variations_form').data('product_id');
if (!productID) return;
$.ajax({
url: wc_add_to_cart_params.ajax_url,
type: "POST",
data: {
action: "tm_get_variation_stock_all",
product_id: productID
},
success: function(response) {
let stockData = JSON.parse(response);
$('.variable-item').each(function() {
let value = $(this).data('value');
if (stockData[value] !== undefined) {
let qty = stockData[value];
// Append stock text
$(this).append(
`${qty} left`
);
}
});
}
});
});