Okay so I’m developing a midlehand between a woocommerce-shop and a rest api which stores the woocommerce products. You can also create, delte and post products from the api and the changes in the api gets transfered to woocommerce. If you create, edit or delete a product in woocommerce the “change” gets transfered to the api. I use websockets to check for changes in both woocommerce and the api. However if I edit a product(editA) for example in the api the new data get sent to woocommerce and edits the product(editB). The API then notice EditB and the data get back to the API for another edit. This continues for ever. I feel like this should be a pretty common problem but I can’t find any similars scenarios.
Their is so much code involed here so it’s kinda hard to show you the stucture, but hopefully you still can set me on the right track! Thanks!
Read more here: Stuck in loop when using websockets