Using PHP in the backend, I'd like to move a product from one category to another if the stock drops to a certain level. Eg. If stock drops to 5, then the product is removed from its usual category and now displays in 'Nearly sold out' category.
I've looked at WP conditionals and the WP update_meta functions but am not sure if I'm on the right track or where the code would be placed.
Anybody have any ideas?