How to Fix Nested Comment Replies with...
This snippet provides a solution to fix nested comment replies not working when Rank ...

WPCodeBox
1164

This WooCommerce code snippet automatically updates cart quantities, eliminating the need to click “Update Cart” and streamlining the shopping experience for your customers.
<?php
add_action('wp_head', function(){
$css_code = <<<CSS
<style>
.woocommerce-notices-wrapper div.woocommerce-message[role=alert] {
display: none;
}
.woocommerce button[name="update_cart"] {
display: none !important;
}
</style>
CSS;
$js_code = <<<JS
<script type="text/javascript">
jQuery(document).ready(function(){
var wpcbScrollToNotices;
jQuery(document).ajaxComplete(function (e) {
jQuery.scroll_to_notices = wpcbScrollToNotices;
});
jQuery('.woocommerce').on('change', 'input.qty', function(){
wpcbScrollToNotices = jQuery.scroll_to_notices;
jQuery.scroll_to_notices = function( scrollElement ) {
return false;
};
setTimeout(function(){
jQuery('button[name="update_cart"]').trigger('click');
}, 200);
});
});
</script>
JS;
echo $css_code;
echo $js_code;
});





