Support » Plugin: Stock Dependencies for WooCommerce » Getting insufficient stock error on order

  • Resolved mauberni



    I recently installed this plugin so I could sell an item as a single unit, or in a box of 24 units.

    1. So I created an attribute called Package with Unit and Box values.

    2. Then on the product I set it as variable product, set the sku(1033), checked “Manage stock?”, set the Stock Quantity at 120.

    3. On Attributes I added the Package attribute I created on step 1, checked Used for variations, selected both Unit and Box values and saved the attributes.

    4. In Variations I created variations for each attribute.

    5. In the Box variation I checked “Add stock dependency”. Set the price, set Dependency SKU as the same of the product(1033) and set the Qty at 24, because in this item there are 24 units in a box.

    6. In the Unit variation I checked “Add stock dependency”. Set the price, set Dependency SKU as the same of the product(1033) and set the Qty at 1.

    7. When ordering the quantities update perfectly while alternating between the package types. As a test I add 15 units to the cart, and they are added successfully. But when I try to place the order I get a message that there is insufficient stock for that item.

    My woocommerce version is 4.4.1

    Thanks in advance.

    • This topic was modified 2 years, 4 months ago by mauberni.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mauberni


    Ok just solved it.

    You have to create distinct skus for both variations and set the dependency sku of the box variation to that of the unit variation and not the product sku.

    I read the text from github and it made it much clearer.

    For example, if you are selling individual bottles of wine in your WooCommerce store, but also want to sell wine in cases of 12 bottles, you can create a product with two variations:

    Quantity: Single bottle

    This variation will have inventory managment enabled, will have a unique SKU, and you will enter the price and total number of bottles as the available stock.

    Quantity: Care of 12 bottles

    You will configure this variation with a unique SKU and a price. This variation will have stock dependencies enabled and will have a dependency on the single bottle variation with a dependency quantity of 12. Once the product variation is configured with a stock dependency, you never have to manage its inventory.

    Thanks! Awesome plugin!

    Plugin Author KevinMcCall


    I’m glad you like the plugin and were able to sort out your issue. Let me know if you have any other questions or issues.

    Thread Starter mauberni


    Hello again,

    I’m having trouble allowing backorders. All my products can be sold either by unit or by box of X units, so I have both packages(unit and box) as variations, the box is stock dependent on the unit. Both variations are configured with “Allow, but notify customer”, the skus are configured correctly, however if there isn’t enough stock it will only allow me to backorder from the unit variation, but not the box(which is the dependent stock).

    You can check it here:

    This product can be bought in a unit(unidade) or a box(caixa) with 18 units, I only have 12 units in stock. It only allows me to backorder from the unit but not the box.

    Thanks in advance

    Plugin Author KevinMcCall


    Hi, the plugin does not check if the stock dependencies allow backorders, which is why you are getting this result. I will look into adding this as it’s going to be useful for other users as well.

    Can you open a new support request for this issue (as this support request is already resolved and a new one will help other people find this problem)?

    Thread Starter mauberni



Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Getting insufficient stock error on order’ is closed to new replies.