Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Default lightbox quantity to 1
// Add following to your theme's functions.php file or use something like
add_action( 'sunshine_before_add_to_cart_form', 'sunshine_lightbox_default_qty_1' );
function sunshine_lightbox_default_qty_1() {
jQuery( document ).ready( function($){
$( 'input[name="quantity"]' ).val( 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.