Almost There
Secure Checkout
Please fill in your details below to finalize your order.
)?/gi, '');
html = html.replace(//gi, ”);
termsBox.innerHTML = html;
}
termsBox.classList.add(‘eha-cleaned’);
}
}
// Run immediately
cleanTermsBox();
// Run whenever WooCommerce updates the checkout via AJAX
if (typeof jQuery !== ‘undefined’) {
jQuery(document.body).on(‘updated_checkout’, cleanTermsBox);
}
// Catch clicks on the terms toggle link to ensure it’s clean when opened
document.body.addEventListener(‘click’, function(e) {
if (e.target.classList.contains(‘woocommerce-terms-and-conditions-link’)) {
setTimeout(cleanTermsBox, 50);
}
});
});