Woocommerce check out quantity and price not updating
-
I have this code in my WordPress to define the minimum quantity. It works fine at the product single page and “add to cart” page.
I want the quantity and price updated automatically on the shopping cart, add to quote and checkout pages.
I don’t want users to “checkout” if the quantity is less than 12 and the price is calculated accordingly.
add_filter( ‘woocommerce_quantity_input_args’, ‘woocommerce_quantity_changes’, 10, 2 );
function woocommerce_quantity_changes( $args, $product ) {
$args[‘input_value’] = 4; // Start from this value (default = 1)
$args[‘max_value’] = 10; // Max quantity (default = n/a)
$args[‘min_value’] = 2; // Min quantity (default = 1)
$args[‘step’] = 2; // Increment/decrement by this value (default = 1)return $args;
}[img]https://i.stack.imgur.com/m0T6w.png[/img]
The page I need help with: [log in to see the link]
- The topic ‘Woocommerce check out quantity and price not updating’ is closed to new replies.