Title: Accessing Stock Level Data
Last modified: March 3, 2023

---

# Accessing Stock Level Data

 *  Resolved [firepages](https://wordpress.org/support/users/firepages/)
 * (@firepages)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/accessing-stock-level-data/)
 * Hi,
 * Thanks for the latest release which seems to work well. I have a problem tring
   to access stock data in a snippet to change some of the display text on the product
   page – when I use $product->get_stock_quantity();, I now get a critical error.
   This worked before upgrading to the latest version.
 * Any help with this would be greatly appreciated.
 * Regards Simon Silver

Viewing 1 replies (of 1 total)

 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/accessing-stock-level-data/#post-16526083)
 * Have a look on this thread and make sure that you are accessing the correct object
   variable?
 * [https://stackoverflow.com/questions/63267402/woocommerce-product-get-stock-quantity-method-return-null](https://stackoverflow.com/questions/63267402/woocommerce-product-get-stock-quantity-method-return-null)

Viewing 1 replies (of 1 total)

 The topic ‘Accessing Stock Level Data’ is closed to new replies.

 * ![](https://ps.w.org/stock-locations-for-woocommerce/assets/icon.svg?rev=2471943)
 * [Stock Locations for WooCommerce](https://wordpress.org/plugins/stock-locations-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stock-locations-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stock-locations-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/stock-locations-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stock-locations-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stock-locations-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/accessing-stock-level-data/#post-16526083)
 * Status: resolved