1 Answers
Use jquery and set enabled at set interval. You may need to change selector to make it work for your website.
Code here:
add_action( 'woocommerce_before_cart', 'update_cart_force_enable' ); function update_cart_force_enable(){ ?> <script> jQuery(document).ready(function () { setInterval( function () { if (jQuery("[name=update_cart]").prop("disabled")) { jQuery("[name=update_cart]").prop("disabled", false); } }, 1000); }); </script> <? }
visualize the cart hooks reference here – https://businessbloomer.com/woocommerce-visual-hook-guide-cart-page/
To get the js hook for other cart-update related actions, do this
jQuery( function($){
$(document.body).on(‘updated_cart_totals’, function () {
…
});
});