我在我的 function.php 中添加了以下代码(每个产品最少为 6 个)它反映在我的产品类别页面上......
add_filter( 'woocommerce_quantity_input_min','woocommerce_quantity_input_min_callback', 10, 2 );
function woocommerce_quantity_input_min_callback( $min, $product ) {
$min = 6;
return $min;
}
但是当点击添加到购物车按钮(Ajax)时,购物车页面只有 1 个数量而不是 6 个数量......如何解决这个问题?
每个产品的购物车页面需要 6 个。