Home>Support>Removing Quantity (+ and -) from product page

Removing Quantity (+ and -) from product page

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hello!

I’m just wondering if Site Origin (Unwind) theme is over-riding Woocommerce and keeping the + and – quantity buttons on product pages? For the products in question, under the product settings, I’ve tried selecting “Sold Individually – Enable this to only allow one of this item to be bought in a single order”. This removes the text input, but not the + and – buttons.

I’ve tried the following code:

/**
* @desc Remove in all product type
*/
function wc_remove_all_quantity_fields( $return, $product ) {
return true;
}
add_filter( ‘woocommerce_is_sold_individually’, ‘wc_remove_all_quantity_fields’, 10, 2 );

as a snippet, however again it removes the quantity text input, but the increase/decrease quantity buttons remain. Is there something about the theme keeping those buttons? And any tips on how to remove them?

Thanks for any advice!

Ross

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 8 months ago Ross Sampson

    Ah, just found adding

    function woocommerce_quantity_input() {}

    to the functions.php does the trick! It blanket removes both quantity text input and increase/decrease +/- buttons leaving just the ‘add to cart’ which is the desired result.

  2. 7 years, 8 months ago Alex S
    Hi, I Work Here

    Hi Ross,

    I’m glad you were able to resolve this issue. I’m sorry I wasn’t able to be of assistance this time. Please be sure to post another thread if you have any other questions.

    Sold Individually – Enable this to only allow one of this item to be bought in a single order

    That setting should be working – sorry about that! I’ve logged this as a bug.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More