• mark-h

    (@mark-h)


    Hi on my store I have a custom admin panel that shows stock and allows my admin users to update stock. Do you have a function I can use to show the real stock to the admin and the virtual stock? At the moment I call stock using get_stock_quantity(); and this is returning the virtual stock not the real stock.
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author James Golovich

    (@jamesgol)

    I don’t think there is currently an easy way to do this. Nobody has asked for it before.

    I’ve got a couple ideas on different options to do this, but I’m not sure exactly when I’ll have a chance to implement it.

    Thread Starter mark-h

    (@mark-h)

    Hi James,

    Thanks for getting back to me. Can I ask how do you on the product list screen show both real stock and virtual stock I’m wondering if there would be a way I could hook in there.

    Thanks

    Plugin Author James Golovich

    (@jamesgol)

    I have a whitelist of functions that always return the real stock quantity. One of the options is to use a WordPress filter on that list of functions but I’m not sure I want to commit to that method. The way I’m doing it now is very hacky and I’d really like to have a more stable solution that needs to be constantly updated every time WooCommerce makes a change.

    Thread Starter mark-h

    (@mark-h)

    I spotted your whitelist before I saw your reply so have added my own function to it. I know you shouldn’t edit plugins directly but for now what I need I’m sure it will be fine.

    BTW from what I have seen love your plugin. Will be using it soon selling approx 50,000 tickets. Last year we had 16,000 people try and get tickets within 2 hours and one of the biggest complaints was they added it to their basket went to checkout and the tickets had sold out so I\m hoping this will be a good solution. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show Real Stock and Virtual Stock’ is closed to new replies.