Skip to content

Instantly share code, notes, and snippets.

@mklasen
Created April 4, 2017 15:03
Show Gist options
  • Save mklasen/afb7182179e95c92a1b153437c596974 to your computer and use it in GitHub Desktop.
Save mklasen/afb7182179e95c92a1b153437c596974 to your computer and use it in GitHub Desktop.
Remove Quantity field from Woocommerce
<?php
// https://github.com/woocommerce/woocommerce/issues/424#issuecomment-8586651
add_filter( 'woocommerce_is_sold_individually', 'wc_remove_all_quantity_fields', 10, 2 );
function wc_remove_all_quantity_fields( $return, $product ) {
return( true );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment