Stock Locations for WooCommerce


Stock Locations for WooCommerce will help you manage your products stock across multiple locations easily. If you have multiple physical stores or storage locations, like warehouses, this plugin may help you.

You can print the locations inside a product page on the frontend, with this shortcodes:

Product pages

[slw_product_locations show_qty="yes" show_stock_status="no" show_empty_stock="yes"]
[slw_product_variations_locations show_qty="yes" show_stock_status="no" show_empty_stock="yes"]
[slw_product_message is_available="yes" only_location_available="no" location="location-slug"]Your custom product message/HTML here[/slw_product_message]

Cart page

[slw_cart_message qty_from_location="location-slug" only_location_available="no"]Your custom cart message/HTML here[/slw_cart_message]


REST API endpoints (both accept GET and PUT requests):

/wp-json/wc/v3/products/id/variations/id (first ID is for parent product, the second one for the variation ID)

This plugin requires at least WooCommerce 3.4.


  • New taxonomy for stock locations
  • Works on both, simple and variable products
  • Easy management of stock with multiple locations, both in product and orders
  • Get and update product stock locations from the REST API
  • Allow customers to select locations when purchasing
  • Auto order allocation for locations stock reduction
  • Send email notifications when stock is allocated for a product in a location
  • Send WooCommerce New Order email copy to item location
  • Compatible with WPML


  • PHP 7.2+


  • Product list filter and stock locations column
  • Stock locations taxonomy
  • Manage stock locations in simple products
  • Manage stock locations in variable products
  • Deduct stock from locations manually
  • Deduct stock from location automatically
  • Allow customers to select locations in cart page
  • Allow customers to select location in variable products
  • Allow customers to select location in simple products
  • Plugin settings
  • Show location stock quantity with a postfix e.g. 20+
  • Edit Stock locations taxonomy
  • Lock default location on frontend.
  • Set price for product as per each stock location.
  • Pre-select default location on product page (frontend).
  • Stock locations for each variation.


  1. Upload “stock-locations-for-woocommerce” to the “/wp-content/plugins/” directory.
  2. Check if you have WooCommerce 3.4+ plugin activated
  3. Activate SLW plugin through the “Plugins” menu in WordPress.

Simple Products

  1. Assign Stock Locations to the product > Update Post
  2. Under Inventory Tab > Activate Manage Stock
  3. Under Stock Locations Tab > Manage the stock for the locations

Variable Products

  1. Assign Stock Locations to the product > Update Post
  2. Under Inventory Tab > Deativate Manage Stock
  3. Under Attributes Tab > Create attributes
  4. Under Variations Tab > Create variations based on attributes
  5. In each variation > Activate Manage Stock & Add Price > Update Post
  6. Under Stock Locations Tab > Manage the stock for the locations for each variation


Stock Locations | Stock Deductions | Settings and Results

**👉 1. How auto order allocation work with multiple stock locations?

**👉 2. How location priority work with auto order stock allocation?

**👉 3. What if all of my locations don’t have the sufficient stock ordered?
If order quantity is within the summation of all stock locations available stock quantity, it will be simply served. If not, auto allocation will not work so admin can decide if he want to deliver the order partially or wait for stock comes in.

**👉 4. How location email works?

**👉 5. Do you want to sell products from only one stock location?

**👉 6. How to make location selection required on cart page?

How to use Cron Job?

How to use REST API?

How Google Map and Location Archives work in Premium Version?

How to lock pre-selected location on frontend?

Turn ON “Enable default location in frontend selection” from WooCommerce > Stock Locations for WC. This option will allow you to select default location for a product on Product Edit page. Now turn ON “Lock frontend location to default” and it will lock frontend location which is selected as default.

I found a bug, where i can report it?

I prefer you to use the Github issues. You can submit a new one here GitHub

How to show location stock quantity with a postfix e.g. 20+?

On settings page you can define a number. If location stock value will be less than the given number, it will display the stock value else will not show the exact number but a plus sign “+” just after the maximum number given.


12 mei 2022
I absolutely love this plugin. Aside from one issue, it's worked perfectly for me for as long as I've had it installed. The author updates regularly and is so responsive and helpful. I pointed out a problem I was having and he addressed it immediately, updated the plugin, and let me know my issue was solved - all within 36 hours.
21 april 2022
Second to none! Fahad was most helpful finding the solution while connected. Clear, patient and effective. The plugin itself has made managing my stock easy in all 8 outlets. It has been the best I found after trying many for woocommerce. Thanks for the great support.
20 april 2022
We use this plugin to manage our store's stock on the backend. Not so much for frontend. We needed to implement some custom code on the backend of the plugin to fit our business rules - Fahad (the developer) has helped us do this quickly and was able to facilitate us through Google Meet. highly recommend this plugin and dev if you have complex business rules!
24 maart 2022
The support from Fahad is fantastic, the Stock Locations product is extremly helpful and the support is the best I have ever had. I did not understand some concepts and Fahad was very helpful and took his time to explain to me, what I needed to do to configure my stock locations correctly. Do not hesitate to use this product!
22 maart 2022
This plugin is easy and simple to use with great support. The developers went out of their way to provide fast & easy support when i was having issues. Now its set up and ready to work.
Lees alle 34 beoordelingen

Bijdragers & ontwikkelaars

“Stock Locations for WooCommerce” is open source software. De volgende personen hebben bijgedragen aan deze plugin.


“Stock Locations for WooCommerce” is vertaald in 7 talen. Dank voor de vertalers voor hun bijdragen.

Vertaal “Stock Locations for WooCommerce” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.



  • Fix: Location based map page UI tweaks and location related email issue. [Thanks to Justyn Thomas][12/05/2022]


  • Fix: Request-URI Too Long. [Thanks to @jarvistran and @beeloudglade][12/04/2022]


  • New: Geo Location related improvements. [Thanks to Justyn Thomas][30/04/2022]
  • Fix: Location based archive page, default location selection tested. [Thanks to Justyn Thomas][07/05/2022]


  • New: Map page related improvements. [Thanks to Justyn Thomas][29/04/2022]


  • New: Compatibility for “PowerPack Pro for Elementor” added. [Thanks to Fady Ilias][27/04/2022]


  • Fix: Priority based locaiton selection when default location as zero stock on product page, improved. [Thanks to Mario Kremser][26/04/2022]
  • New: Everything stock status to instock option added for product page. [Thanks to Darren Lew][26/04/2022]


  • New features are in progress. [Thanks to Roland Steinmasdl][08/04/2022]
  • New: Stock location Enabled/Disabled column added on stock locations list. [Thanks to Andrew Gortchacow][21/04/2022]
  • New: Stock quantity can be updated from the products list as well. [Thanks to Andrew Gortchacow][23/04/2022]


  • Fix: Removed the extra/empty stock location qty. brackets on products list page in admin panel. [Thanks to Fady Ilias][20/04/2022]


  • Fix: API will accept the zero qty. as well for the stock. [Thanks to kastiell93][25/03/2022]
  • Fix: [Thanks to Daniel Sieff][08/04/2022]


  • New: Stock locations tab, enable/disable feature added. [Thanks to Paul Eagles][24/03/2022]


  • Fix: The total stock does not match the sum of the locations stock. [Thanks to Jere SeppƤ][24/03/2022]


  • New: Sell products from only one stock location. [Thanks to Paul][23/03/2022]


  • Fix: Cron job query updated for the products with recently changed timestamp. [Thanks to Riley Pollard][22/03/2022]


  • Fix: Product page, backorder status will contribute in stock status and product availability for sale. [Thanks to Mario Kremser][22/03/2022]


  • Fix: [Thanks to johnmunez1][05/03/2022]
  • Fix: Product page, elementor, backorder status, in stock status, out of stock status transitions ensured. [Thanks to Mario Kremser][21/03/2022]


  • Fix: Locations map with a popup with useful information about the location/pickup. [Thanks to Justyn Thomas][04/03/2022]
  • Fix: Notice: Undefined property: stdClass::$slw_backorder_location. [Thanks to Shaun Hopkins][05/03/2022]


  • New: Locations can be turned ON/OFF for Google Map. [Thanks to Justyn Thomas][02/03/2022]
  • New: Locations can be turned ON/OFF everywhere. [Thanks to Elika][02/03/2022]
  • New: Action hooks added to manage archive page template.
  • Fix: Issue #124 resolved on github repository. [Thanks to Wandavasquez95][02/03/2022]


  • Fix: In stock / Out stock issue for zero value in both simple and variable products. [Thanks to Russell Field][01/03/2022]


  • New: Locations map with a popup with useful information about the location/pickup. [Thanks to Justyn Thomas][28/02/2022]


  • New: Crons tabs added. [Thanks to Dennis Broers – susNL][24/02/2022]
  • Fix: Stock not updated correctly – [Thanks to Dennis Broers – susNL][24/02/2022]


  • New: Different prices according to the inventory locations. [Thanks to Justyn Thomas][01/02/2022]
  • Fix: In stock / Out stock issue for zero value in both simple and variable products. [Thanks to Petri Mustanoja][17/02/2022]


  • New: Different prices according to the inventory locations. [Thanks to Justyn Thomas][20/01/2022]


  • Fix: [Thanks to harute125][20/01/2022]


  • Fix: Cancelled order location was staying with -1 stock. [Thanks to Phannaline Khemdy][19/12/2021]


  • Fix: Out of stock status not being displayed, showing 0 availabilty instead. [Thanks to Donny Tejeda][15/12/2021]
  • New: Visibility section for stock location under cart items with checkbox options. [Thanks to Phannaline Khemdy][16/12/2021]
  • Fix: Show location selection in cart will not effect the user selected items. [17/12/2021]
  • New: Price for different warehouse on same product? [Thanks to IHEnan99, Puigdemunt & oppssssss][17/12/2021]


  • Fix: Variable product locations are empty, stock was not appearing as it was dependent on location selection. [Thanks to Donny Tejeda][14/12/2021]
  • Fix: Product and Varitons stock values should be editable if locations are not yet selected. [14/12/2021]


  • New: Settings page option for restore stock for failed order status tested with the user on Google meeting. [Thanks to Jere][12/12/2021]


  • New: Settings page updated with one more option, restore stock for failed order status. [Thanks to Jere SeppƤ][12/12/2021]


  • New: Added urgent help link to help section for better support. [12/12/2021]


  • New: Settings page updated with two more options, restore stock for cancelled and pending order statuses. [Thanks to Phannaline Khemdy][11/12/2021]


  • Fix: Stock is not automatically allocated. [Thanks to weertman & freshwebno][09/12/2021]


  • Fix: Critical error after installation. [Thanks to martinnijkamp][08/12/2021]


  • Fix: Bug on cart page – [Thanks to designfin][08/12/2021]


  • New: Assets updated.


  • New: (Name change and old orders for customers) – Hide location information from old orders, solution provided on support ticket thread. [Thanks to Petri Mustanoja /][07/12/2021]
  • Fix: Can’t manage my stock anymore. [Thanks to Jelle Tempelman][07/12/2021]
  • Fix: Stock at Locations set but Stock still shows 0. [Thanks to andrehlprr & leax] [07/12/2021]
  • New: Change Text for quantity value – new feature added. [Thanks to Gina Pelli/mediih] [07/12/2021]
  • Fix: Make it possible to change location in cart #116. [Thanks to screenpartner & Michael Wilhelmsen][08/12/2021]


  • New: Bootstrap and FontAwesome added. Assets are rearranged and simplified.
  • Fix: Fatal error fixed. [Thanks to kentakofot][07/12/2021]


  • New: Debug log tab added for better troubleshooting. [Thanks to nickdill, rivalink and tomkolp][07/12/2021]
  • Fix: Infinite redirection replaced with a notice so customers can be saved from inconvenience.


  • Fix: Update suggest by pacmanito. [20/11/2021]


  • New: First revised commit through github. [19/11/2021]
  • New: Updated authors info and removed email address. [19/11/2021]


  • New: Plugin support team extended and repositories are relocated. [Thanks to Alexandre Faustino][08/11/2021]
  • Fix: PHP warning fixed. [Thanks to dsl225/John & mustanoja][09/11/2021]


  • New: updated compatibility for WooCommerce 5.3
  • Fix: bug on order item manual stock reduction on order save


  • Fix: bug that triggers fatal error


  • New: stock locations table in settings with each location ID
  • New: setting to define a default location to be locked in frontend
  • New: locations stocks reduction on pair with WooCommerce reduce actions
  • New: WPML compatibility
  • New: bumps Import/Export add-on version to 1.1.0
  • Fix: frontend selector style issues on variable products
  • Fix: if rest location is provided with an empty array we now clear the previous allocations as you would expect to happen. Thanks to @shanerutter
  • Fix: order item view, show previous stock locations when stock was allocated against a location but the location is no longer valid for that item. Thanks to @shanerutter
  • Fix: showing allocate stock message, if the product no longer has stock allocations and the order line has previous stock location allocations. Thanks to @shanerutter
  • Fix: missing stock or stock status in frontend selection
  • Fix: bug on showing ‘outofstock’ when adding new products with stock available


  • Fix: updates stock status on stock reduction
  • Fix: marking product ‘instock’ if has stock instead of backorder
  • Fix: bug that crashes WP


  • New: branding
  • New: allow third party functions to deduct WC stock on the main variation product with new hook ‘slw_allow_variation_product_stock_reduce’
  • Fix: restriction on manual stock allocation if the order has stock reduced meta
  • Fix: same location per cart item not being respected
  • Fix: cart page location selection required not working


  • Fix: bug of product variation WC stock not being updated when locations stock is deducted (updated)


  • New: setting to show location stock quantities on product and cart pages on location selectors
  • Fix: bug of product variation WC stock not being updated when locations stock is deducted


  • New: POT file for languages
  • New: settings tabs
  • Fix: issue on WC reducing product stock on line item save


  • New: removed barcodes feature from plugin to focus only on stock locations
  • New: plugin settings moved to the WooCommerce menu
  • New: restore order items stock locations on WooCommerce order restore
  • New: setting to make locations selection in cart required
  • New: filter ‘slw_disallow_third_party_allocate_order_item_stock’ to allow third party plugins to allocate item locations stock
  • Fix: to prevent product WC stock decrease below zero
  • Fix: undefined index error for plugin setting ‘location_email_notifications’
  • Fix: to prevent reducing the stock twice for the product if the order was already reduced
  • Fix: replace post parent_id property by get_parent_id() method stopping warnings thrown by woocommerce
  • Fix: adding callable check for product method get_id() in stock allocation helper


  • Fix: jQuery request returning 404 because of missing hook


  • New: include ‘Out of stock’ and ‘On backorder’ locations in frontend selections
  • New: filter ‘slw_allow_wc_stock_reduce’ to allow third party plugins to prevent WC stock reduction
  • Fix: jQuery error for variants without locations
  • Fix: jQuery bug on clearing location selection on variation in product page
  • Fix: jQuery error when frontend settings not enabled
  • Fix: meta ‘_slw_data’ not beeing saved correctly


  • New: filter ‘slw_stock_allocation_notification_message’ to customize the email notification message
  • New: send email copy of New Order WC email to location registered address
  • New: send email notification when stock is allocated for a product in some location
  • New: show location taxonomy in REST API
  • New: setting to enable/disable the barcodes tab
  • Fix: stock allocation when customer selects or not a location
  • Fix: bug preventing stock deduction when using in conjugation with Point of Sale for WooCommerce plugin


  • New: setting to include location data in formatted item meta
  • Fix: several bugs showing warnings


  • New: setting to auto delete unused product stock locations meta
  • New: filter ‘slw_shortcode_product_location_stock’ for shortcodes ‘slw_product_locations’ and ‘slw_product_variations_locations’
  • New: CSS classes for shortcodes ‘slw_product_locations’ and ‘slw_product_variations_locations’
  • Fix: ‘outofstock’ taxonomy on product save/update
  • Fix: setting ‘Different location per cart item’, values were exchanged


  • Fix: helper ‘view’ function call, preventing colision with other plugins with the same function name


  • New: plugin setting to lock selected location in cart for every cart item
  • Fix: check if location stock is enough for the cart item, if not hide from select option
  • Fix: if auto allocation exist for the location disable WC hold stock


  • New: stock locations select in cart page
  • New: settings page
  • New: auto order allocation for stock
  • New: shortcode ‘slw_cart_message’ to display a custom message in the cart page
  • New: shortcode ‘slw_product_message’ to displaying a custom message on product page
  • New: options for stock locations: Default for New Products, Backorder Location, Auto Order Allocate and Stock Location Priority
  • Fix: several bugs and PHP legacy compatibilities


  • Fixes bug on shortcodes method


  • Improved stock locations levels products listing
  • Locations added to REST API products and variations endpoints for GET and PUT requests, thanks to @shanerutter


  • Remove flush rewrite rules, should be avoided for now


  • Add variations stock levels to products listing column
  • New shortcode ‘slw_product_variations_locations’
  • Fixes on shortcode ‘slw_product_locations’


  • New filter ‘slw_shortcode_product_location_name’
  • New shortcode ‘slw_product_locations’


  • New column in product listing with stock locations imventory
  • Fix bug on getting barcodes data for shortcodes
  • Fix bug reported by @sebtoombs
  • Plugin structure refactoring


  • Tested up to WordPress 5.4
  • Fix – Removed condition that prevent other roles beyond the admin from accessing the plugin functionality
  • Added Capabilities to the location taxonomy
  • Fix – Some actions priorities and arguments number were missing


  • Fix – Bug creating new order, trying to get items on nonexistent order


  • Tested up to WooCommerce 4.0.1
  • Fix – Added condition to check variation products in hide meta function
  • Fix – Check if order item product exists before trying to hide meta
  • Fix – Check if order has items before trying to hide meta


  • Initial release