Set a default quantity input value for a variable product category in WooCommerce
On woocommerce_available_variation hook the $args array doesn’t include input_value argument. Also You are not using has_term() conditional function in the right way for product categories. So try the following code instead: add_filter( ‘woocommerce_available_variation’, ‘customizing_available_variation’, 10, 3 ); // Variations function customizing_available_variation( $args, $product, $variation ) { if( has_term( ‘flyer’, ‘product_cat’, $product->get_id() ) ) { $args[‘max_qty’] … Read more