5th Year Anniversary Super Sale! Save Upto 50% OFF*

How to add Quantity label in front of Add to cart button in single page woocommerce?

By blog

There is simple way to add label of Quantity in front of add to cart button.,

Add this code into functions.php.,

add_action( 'woocommerce_before_add_to_cart_button', 'echo_qty_front_add_cart' );
 
function echo_qty_front_add_cart() {
 echo '<div class="qty">Quantity: </div>'; 
}

and add this too at the bottom of the style.css.,

div.qty {
    float: left;
    padding: 10px;
}


Finally the result is.,

Tagged under:

Show Buttons
Hide Buttons