• Resolved xpafiolis

    (@xpafiolis)


    Love your plugin, running a huge ecommerce site this issue has been plaguing me and has been a nightmare every time we launch products and get down to the last 10.

    i saw screenshots and read about your Minimum Stock to Skip Check option, however i do not see the option on the admin page? any idea where i can find it or how to activate this?

    We start with 2000+ units then only have issues once we get down to 100 or less. so this feature may speed up the site and eliminate extra work?

    Thanks in advance
    Chris

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author James Golovich

    (@jamesgol)

    That option was causing confusion for people and wasn’t useful for most cases, though it sounds like you have a perfect use case for it. I removed the option and switched it to a WordPress filter you can add via code in you functions.php file or somewhere similar.

    The filter name is ‘wc_csr_min_no_check’ so you could add something like:

    
    add_filter( 'wc_csr_min_no_check', 'set_wc_csr_min_no_check', 10, 3 );
    function set_wc_csr_min_no_check( $min, $id, $stock ) {
        return 10;
    }
    

    This will cause the checks not to happen until the stock is less than 10. With the $id being passed you could even add some kind of logic so different items have different minimum levels.

    Thread Starter xpafiolis

    (@xpafiolis)

    awesome, so to be clear the return 10 part i can change to 100 to check if it’s less than 100?

    thanks so much!

    Plugin Author James Golovich

    (@jamesgol)

    Yes that is correct.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Minimum Stock to Skip Check’ is closed to new replies.