Support » Plugin: Quantity Field on Shop Page for WooCommerce » How to set a max quantity for out of stock

  • Resolved Carlos Volp


    I can solve it like this:

    You must have the woocommerce folder in your theme.


    Edit the quantity-input.php file

    After the
    defined (‘ABSPATH’) || exit;

    put this code
    global $product;

    search for the line with the code.
    max = “<? php echo esc_attr (0 <$ max_value? $ max_value: ”);?>”

    And change to
    max=”<?php echo esc_attr( $product->get_max_purchase_quantity()); ?>”

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author wooassist


    @carlosvolp thanks for the feedback. this solution if through the theme and not the plugin. we will find time to integrate this feture in a future version of our plugin. thanks for your support!

Viewing 1 replies (of 1 total)
  • The topic ‘How to set a max quantity for out of stock’ is closed to new replies.