This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Removing Quantity (+ and -) from product page

8 years ago · Last reply by Alex S 8 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. Ross Sampson 8 years, 3 months ago

    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. Alex S Staff 8 years, 3 months ago

    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.

Have a different question or issue?

Start New Thread