I would like to know whether an addition of a product to a cart occurred on woocommerce. On the documentation it says that an application should consume a webhook that notifies about a woocommerce_add_to_cart
action.
So I implemented it and gladly got a message saying it happened a short while after such an event occurred.
Here's an example JSON I got from woocommerce:
{"action":"woocommerce_add_to_cart","arg":"fe9fc289c3ff0af142b6d3bead98a923"}
However since many visitors of a woocommerce website may have their own cart, and many products, I would like to know if there's a way to decode the arg field so that it will provide a unique product that was added to a specific cart.
In case I am using the wrong method in order to learn about an addition to a cart, I would be happy to learn which one may be better for me.