• Hi.

    I know that the Update cart button is disabled by default until you make changes to the cart. My client insists that the button should be active all the time. Is there a way for me to keep the Update cart button enabled all the time no matter what happens to the cart?

Viewing 2 replies - 1 through 2 (of 2 total)
  • D Smith a11n

    (@dsmithweb)

    Automattic Happiness Engineer

    Hmm!

    Does adding the below code to your functions.php “fix” this?

    function remove_disable_updatecart() {
    ?>
    <script type='text/javascript'>
    jQuery(document).ready(function() {
    jQuery( '.shop_table.cart' ).closest( 'form' ).find( 'input[name="update_cart"]' ).removeProp( 'disabled');
    });
    </script>
    <?php
    }
    add_action( 'wp_footer', 'remove_disable_updatecart', 99 );
    ?>
    • This reply was modified 9 years, 6 months ago by D Smith a11n.
    • This reply was modified 9 years, 6 months ago by D Smith a11n.
    Thread Starter sebastianks

    (@sebastianks)

    Hi @dsmithweb

    Thanks for your reply. Your code works, but not if I click on the update cart button once. Do you have any idea how to keep it active?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Update Cart button disabled by default’ is closed to new replies.