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
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.
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.
That setting should be working – sorry about that! I’ve logged this as a bug.