Quantcast
Channel: Issue when using "woocommerce_product_get_stock_quantity" filter hook - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by 7uc1f3r for Issue when using...

The error is due to several reasonsHook is deprecatedYour callback function only returns a number: 5, not a string: "5+"By using $_product->get_stock_quantity() you create an infinite loop, since...

View Article



Issue when using "woocommerce_product_get_stock_quantity" filter hook

I want to replace the stock quantity on the single product page with "5+", if the stock quantity is more than 5, else display the original quantity.I tried to modify the hook as belowadd_filter(...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>