Custom Stock Quantity Multiplier for WooCommerce

Custom Stock Quantity Multiplier for WooCommerce manages shared inventory on variable products. You don’t track stock separately for each variation. Instead, keep one stock number on the parent product. When someone buys a variation, it deducts a custom amount from that shared pool.

  • This is ideal for selling items in different pack sizes, cases, or bundles from the same physical inventory:
  • A single bottle pulls 1 unit.
  • A 6-pack pulls 6 units.
  • A 12-pack case pulls 12 units.

All variations draw from the same total inventory. When stock runs low, the plugin blocks orders that exceed what you have.

Requirements

↑ Back to top
  • WordPress 6.0 or higher
  • WooCommerce 9.0 or higher
  • PHP 7.4 or higher
  • WooCommerce stock management enabled

Installation

↑ Back to top
  1. Download the plugin zip file.
  2. Go to Plugins > Add New > Upload Plugin in your WordPress admin.
  3. Select the zip file and click Install Now.
  4. Click Activate Plugin.

Step-by-Step Setup Guide

↑ Back to top

Configure your variable products with shared stock multipliers using these steps.

Step 1: Enable WooCommerce Stock Management

↑ Back to top

Turn on stock management in WooCommerce settings before you start:

  1. Go to WooCommerce > Settings.
  2. Click the Products tab, then Inventory.
  3. Check Enable stock management.
  4. Click Save changes.

Step 2: Set Shared Stock on the Parent Product

↑ Back to top

Manage stock at the main product level, not in variations:

  1. Go to Products > Add New or edit an existing variable product.
  2. Select Variable product from the Product data dropdown.
  3. Click the Inventory tab on the left.
  4. Check the box for Track stock quantity for this product.
  5. Enter your total available inventory in the Quantity field.
  6. Set your backorder preference and low stock threshold.

Step 3: Create Variation Attributes

↑ Back to top

Add an attribute defining your purchase sizes:

  1. Click the Attributes tab on the left.
  2. Click Add new or select a global attribute.
  3. Name your attribute, like Pack size.
  4. Enter values separated by a vertical bar, like Single | 6-pack.
  5. Check the box for Used for variations.
  6. Click Save attributes.

Step 4: Generate Product Variations

↑ Back to top

Generate variations from your attributes:

  1. Click the Variations tab on the left.
  2. Select Generate variations and click Go.
  3. WooCommerce creates rows for each variation.

Step 5: Set the Stock Multiplier for Each Variation

↑ Back to top

Tell each variation how many parent stock units to deduct:

  1. Click on a variation row to expand its settings.
  2. Set regular pricing and other standard variation fields.
  3. Find Stock units deducted per purchase.
  4. Enter how many parent stock units this variation deducts:
    • For a single item, enter 1.
    • For a 6-pack, enter 6.
    • For a 12-pack, enter 12.

Storefront Behavior and Cart Validation

Your store gets protected against overselling at every step. Customers can’t buy more than you have.

Real-Time Add-to-Cart Validation

↑ Back to top

Customer picks a variation and clicks Add to Cart. Plugin multiplies the quantity they want by the variation multiplier. Goes over what’s left in parent stock? Addition gets blocked. Error message pops up.

Cart and Checkout Validation

↑ Back to top

Say a customer adds multiple variations of the same product to their cart. One 6-pack plus some singles. Plugin adds up the total stock needed. Any update on the cart or checkout page that exceeds shared parent inventory stops the checkout. Error shows up.

Automatic Stock Deduction on Order Placement

↑ Back to top

Order gets placed. WooCommerce cuts parent stock by the ordered quantity times each variation’s multiplier. Buy one 6-pack and 6 units vanish from shared parent inventory in one go.

Dynamic Out-of-Stock Status and Backorders

↑ Back to top

Plugin watches available stock versus what variations need.

  • Backorders Not Allowed: Parent stock drops below a variation’s multiplier value. Variation gets marked out of stock on the product page. Add to Cart button disappears for that option. Other variations stay buyable if enough stock remains.
  • Backorders Allowed: You pick Allow or Allow, but notify customer on the parent product inventory. Customers order anyway even when stock is low.

Order Cancellation, Refunds, and Multiplier Restocking

↑ Back to top

Order gets cancelled or refunded.

  1. Open it under WooCommerce > Orders.
  2. When you make a refund or switch status to cancelled, check Restock refunded items.
  3. Plugin calculates the multiplier for each line item and puts the full multiplied quantity back into shared parent stock.
  4. Order note logs the exact stock increase and new stock level.

Model Context Protocol (MCP) Integration

↑ Back to top

What is MCP?

↑ Back to top

Model Context Protocol is an open standard. AI assistants like Claude Desktop, Cursor, or automated store agents connect to your store securely through it. An AI assistant reads inventory capacity, simulates multiplier adjustments, and updates stock settings. You control everything.

  1. MCP Feature Summary

Your plugin has 24 built-in MCP abilities across three areas.

  1. Read and Capacity Abilities: View plugin health, list variable products, inspect multipliers, calculate live purchasing capacity, check cart impact, view orders and refunds.
  2. Preview Abilities: Simulate single or bulk multiplier changes. See capacity changes before you save anything.
  3. Controlled Write Abilities: Update multipliers, reset multipliers, update parent stock, or enable stock management. All safe.
  1. How to Configure MCP in WordPress Admin
  2. Go to WooCommerce > Stock Multiplier MCP in your WordPress admin menu.
  3. Review and set up security options.
    • Enable MCP Integration: Turns on MCP functionality.
    • Enable Read Abilities: AI tools view product multipliers, inventory levels, and orders.
    • Enable Write Abilities: AI tools update multipliers and stock numbers. Off by default for safety.
    • Require Confirmation for Writes: AI tool asks you first before making changes.
    • Enable High-Risk Stock Writes: Safety checks kick in for bulk updates and parent stock changes.
    • Require Idempotency: Stops accidental duplicate requests.
    • Enable MCP Activity Log: Audit trail tracks the latest 100 actions AI tools take.
    • Admin Write Capability: Set the WordPress user capability needed. Default is manage_options.
  4. Click Save Changes.

Connecting AI Clients

↑ Back to top
  1. Make sure WordPress MCP Adapter plugin is active on your site.
  2. Generate an Application Password in WordPress.
    • Go to Users > Profile or edit your administrator user.
    • Scroll to Application Passwords section.
    • Enter an application name like AI Assistant.
    • Click Add New Application Password and copy it.

Configure your AI client using the MCP Adapter Endpoint URL shown on the plugin settings page. Use your username and application password.

Troubleshooting

↑ Back to top

Why is the multiplier field not visible on my variation?

↑ Back to top

WooCommerce stock management needs to be on. Go to WooCommerce > Settings > Products > Inventory and enable it. Multiplier field won’t show up otherwise. Also check if your variation is set to Virtual. Virtual items hide that field.

Why is my variation showing out of stock?

↑ Back to top

Look at your parent product inventory. When parent stock drops below what the variation’s multiplier needs, and backorders are off, the plugin marks it out of stock. Stops overselling.

Can I manage stock on both the parent and variation level?

↑ Back to top

No. Plugin uses shared parent inventory only. Uncheck the “Manage stock?” checkbox in individual variations. Leave it off.

Why is cart validation blocking my purchase?

↑ Back to top

Your cart items multiplied by their multiplier values go over total parent stock. Lower your cart quantities. Match what’s actually available.

Why did an AI client return a confirmation request?

↑ Back to top

You turned on Require Confirmation for Writes. Plugin asks for approval before any stock or multiplier changes happen.

Frequently Asked Questions (FAQ)

↑ Back to top

What happens if I do not set a multiplier value for a variation?

↑ Back to top

Leave it blank or put 0 and it defaults to 1. One item equals one stock unit.

Does this plugin work with High-Performance Order Storage (HPOS)?

↑ Back to top

Yes. Fully compatible with WooCommerce High-Performance Order Storage and custom order tables.

Does stock get restored properly if a customer cancels an order?

↑ Back to top

Yes. When you cancel or refund an order with restocking on, the plugin multiplies the refunded quantity by the variation multiplier. Full amount goes back to parent inventory.

Can AI clients change stock without your permission?

↑ Back to top

No. Write permissions are off by default. Even when you enable them, Require Confirmation for Writes makes the AI agent ask you first before changing anything.

Can I set different multipliers for different variations of the same product?

↑ Back to top

Yes. Each variation gets its own multiplier. Single can costs 1 unit. 6-pack costs 6. 12-pack costs 12. Whatever you set.

Related Products

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Offer add-ons like gift wrapping, special messages or other special options for your products.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.