• Resolved Egbert Jan

    (@kshbu0)


    Hi, I would like to be able to decrease a stock field in a user table (a non-Woo table in the same WP database) when the Woo _stock in postmeta is changed due to a web purchase.

    The user table is used by transactions in the physical store ans should be updated after a web purchase to prevent that the stock values in the Woo table get out of sync with the user table. Is there a hook near the Woo stock update that I could use? Any other cunning plan how to achive this?

    TNX! Egbert Jan, NL

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Gerhard Potgieter

    (@kloon)

    Hi, there are no hooks that fire directly when changing the stock, but you can use the woocommerce_before_product_object_save hook which will fire every time stock is adjusted as it triggers a product save and will include all the data including the stock status and quantity when orders get placed.

    Thread Starter Egbert Jan

    (@kshbu0)

    Thanks Gerhard. I’ll further investigate this. Sounds like a way to a solution. Now find out how to implement it… I’m not a very good programmer. RTFM, I guess. The Woo Codex in this case.
    Cheers, Egbert Jan

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Syncing stock to external table’ is closed to new replies.