Skip to content

Instantly share code, notes, and snippets.

View matteoarlotti's full-sized avatar

Matteo Arlotti matteoarlotti

View GitHub Profile
@webaware
webaware / gist:ebdb30dc33714f04e32b
Created February 24, 2015 09:57
Restore support for +/- quantity buttons in WooCommerce 2.3+
jQuery(function($) {
// Quantity buttons
$( 'div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)' ).addClass( 'buttons_added' ).append( '<input type="button" value="+" class="plus" />' ).prepend( '<input type="button" value="-" class="minus" />' );
$( document ).on( 'click', '.plus, .minus', function() {
// Get values
var $qty = $( this ).closest( '.quantity' ).find( '.qty' ),