Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kabbo508/508dc9f47c43eaa273267606aa80de31 to your computer and use it in GitHub Desktop.
Save kabbo508/508dc9f47c43eaa273267606aa80de31 to your computer and use it in GitHub Desktop.
Add Quantity Plus-Minus Button to the Quantity field
// Add Quantity Plus-Minus Button to WooCommerce Quantity Input
add_action( 'woocommerce_after_quantity_input_field', 'mukto_display_quantity_plus' );
function mukto_display_quantity_plus() {
echo '<button type="button" class="plus">+</button>';
}
add_action( 'woocommerce_before_quantity_input_field', 'mukto_display_quantity_minus' );
function mukto_display_quantity_minus() {
echo '<button type="button" class="minus">-</button>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment