I’ve got a plugin that ties into the
added_term_relationship action hook, however one of my clients that needs this plugin updates their store daily using the WooCommerce REST API. Having reviewed the documentation and associated code, I reasoned that
woocommerce_api_create_product would be the most likely place to include my function, however it does not appear to be firing off when the updates are performed, based on a recent inspection of new posts added using the WC REST API.
I’m getting the feeling that the issue at hand here is that the plugin isn’t being loaded when the REST API call is being executed, thus the relevant
add_action() call is never actually firing off.
Is there a way to hook into REST API updates from either a plugin or directly inside a theme?
Read more here: Hooking into WooCommerce REST API from a plugin