• Hello,

    I’m not sure when the issue started, but with the current version, I have the following problem:

    I changed the default value of the Add To Cart Input Field to eg. 7 using the Filter “woocommerce_quantity_input_args” / $args[‘input_value’] = 7;

    If I now add, say, 10 from one product to the basket, the price is correctly calculated, but the input field, which should be 10, is instead 7.

    In previous Versions, the error did not appear.

    If you want to reproduce the error:

    function custom_quantity( $args, $product ) {
    if (is_woocommerce() ){
    $args['input_value'] = 7;
    }
    return $args;
    }
    add_filter( 'woocommerce_quantity_input_args', 'custom_quantity', 10, 2 );
Viewing 1 replies (of 1 total)
  • Plugin Support Janilyn T

    (@janilyn409)

    Hi @terpentin ,

    We have checked and confirmed that there is no issue with the quantity in our plugin. Possibly, the filter is not applicable to our plugin.

    You can kindly consider using a plugin instead, for example our WPC Product Quantity https://ww.wp.xz.cn/plugins/wpc-product-quantity/ to set up default value for products instead of the default values by WooCommerce: https://prnt.sc/tNKvJHSHUILV . However, with this free version, the default quantity value will be applicable to all products across the store.

    Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Wrong quantity if default quantity is set’ is closed to new replies.