/woocommerce-show-qty

Wordpress plugin for Woocommerce adding a shortcode to show the remaining quantity for a single product

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Woocommerce - Show product quantity shortcode

Wordpress plugin for Woocommerce adding a shortcode to show the remaining quantity for a single product

Installation

To install the plugin, copy the folder to wp-content/plugins in your wordpress directory. Then navigate to the "Plugins" menu in the Wordpress backend, scroll down to the "Woocommerce - Show product quantity shortcode" entry and click "Activate" to activate the plugin.

Usage

In any location in Wordpress that accepts shortcodes, you can place the code [show_qty id=""]. You need to replace <product id> with the id of the Woocommerce product that you want to display the remaining quantity in stock for. You can find the product id by going to the Woocommerce products list and hovering the mouse over the product you need. This will reveal the product id:

Screenshot of Woocommerce product list

Credits

The code for this plugin is entirely taken from Alok Jain with his kind permission.