{"id":16525399,"date":"2023-03-03T14:49:17","date_gmt":"2023-03-03T14:49:17","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/accessing-stock-level-data\/"},"modified":"2023-03-03T14:49:17","modified_gmt":"2023-03-03T14:49:17","slug":"accessing-stock-level-data","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/accessing-stock-level-data\/","title":{"rendered":"Accessing Stock Level Data"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 &#8211; when I use $product-&gt;get_stock_quantity();, I now get a critical error. This worked before upgrading to the latest version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any help with this would be greatly appreciated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Regards Simon Silver<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"template":"","class_list":["post-16525399","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16525399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16525399\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16525399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}