Woocommerce Show Stock

Descripción

The goal of this plugin is to show the “stock quantity” under each product in the shop, category and archive pages (wherever there is a loop). The code is based on this tutorial: https://businessbloomer.com/woocommerce-add-stock-quantity-on-shop-page/

Instalación

  1. Upload the folder wocommerce-show-stock to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. That’s it!

Reseñas

4 de marzo de 2021
Not working on shop page with Woocommerce 5.0.0, WP 5.6.2 and Uncode theme…
16 de febrero de 2021
I'm giving the plugin a 3 star because the plugin is now outdated in terms of version of code. The developer needs to keep the plugin updated so that it is compatible with the latest version of WordPress and PHP. If you guys are having the following issue when you install and activate the plugin: Warning: _() expects exactly 1 parameter, 2 given in /home/customer/www/sitename/public_html/wp-content/plugins/woo-show-stock/main.php on line 32 Just follow my steps to resolve this issue. It worked for me I'm hoping it also works for you. Please note that I haven't tested the fix on a variable product with stock count enabled. But it seems to work for a basic product. I'm sure the same fix will apply if you get more or less the same error on a variable product. Here is my simple solution that fixes this problem. 1. Locate the the file in your directory: /home/customer/www/sitename/public_html/wp-content/plugins/woo-show-stock/main.php 2. Open the file using Notepad ++ or which ever notepad/software you want to use 3. Locate line 32 which should have the following line of code: return ‘<div class=”remaining”>’.printf(_(‘%s left in stock’,’woo-show-stock’), number_format($product->get_stock_quantity(), 0, ”, ”)).'</div>’; 4. Locate where it says: .printf(_(‘%s left in stock’,’woo-show-stock’), 5. right after the .printf( —-> there must be 2x underscores instead of one. Currently the plugin gives the error because its missing 2x underscores. It currently has one. Just add an additional underscore, so the code should now read as .printf(__ 6. Copy/paste this entire code: return ‘<div class=”remaining”>’.printf(__(‘%s left in stock’,’woo-show-stock’), number_format($product->get_stock_quantity(), 0, ”, ”)).'</div>’;
29 de septiembre de 2020
After enabling, the following error appears where it's supposed to display stock: Warning: _() expects exactly 1 parameter, 2 given in /home/customer/www/sitename/public_html/wp-content/plugins/woo-show-stock/main.php on line 32
16 de noviembre de 2019
Although to plugin page says to simply install it and do nothing else, this is wrong. I'll try to save you the 30 min I wasted. Make sure to go to woocommerce/settings/products/inventory and check at bottom "always show available stock.
Leer todas las 24 reseñas

Colaboradores y desarrolladores

«Woocommerce Show Stock» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

Traduce «Woocommerce Show Stock» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.