[ad_1]
Do you know any methods for adding select all checkbox in Woocommerce on the checkout page?
There is a lot of methods on the internet I tried, but none of them worked on Woocommerce checkout page and I have no idea why. Maybe you can tell me what is up with woocommerce checkput page.
I tried these solutions:
https://stackoverflow.com/a/65094602/12511759
https://stackoverflow.com/a/2191026/12511759
None of them worked.
I tried it even with inline scripts like this:
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script>
$(document).ready(function () {
$("#checkall").change(function () {
$("input:checkbox").prop('checked', $(this).prop("checked"));
});
$('.input-checkbox').on('click', function () {
if ($('.input-checkbox:checked').length == $('.input-checkbox').length) {
$('#checkall').prop('checked', true);
} else {
$('#checkall').prop('checked', false);
}
});
});
</script>
Thank you guys in advance.
[ad_2]