Allow administrator to reset WooCommerce product stock in the frontend
I am adding a button on products in shop page only when admin is connected. This button when pressed will reset product stock to zero (0). Sometimes it can be easier to clean out of stock products from website using products images than searching them with their sku. I made this code based on @LoicTheAztec