Can’t use the new classes / functions, as we haven’t updated to WC 3.0 (plugin incompatibility).
So, I tested the wc_recount_after_stock_change( $product_id ). It seems to work.
Thank You
Hello,
I’d like to say I ‘pull’, but I’m not certain with the terminology.
Here’s what I do:
– Hourly scheduled function.
– Get JSON response from supplier API, parse JSON.
– For each product, update _stock and _stock_status in $wpdb->postmeta table.