Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WooCommerce product variaties uitschakelen wanneer deze zijn uitverkocht
// plaats deze code in het functions.php bestand van je child thema
add_filter( 'woocommerce_variation_is_active', 'fws_disable_variations_out_of_stock', 10, 2 );
function fws_disable_variations_out_of_stock( $is_active, $variation ) {
if ( ! $variation->is_in_stock() ) return false;
return $is_active;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment