Woocommerce: Detect where Add to Cart button was clicked and run different code
In the ecommerce store: There are items displayed on Homepage and each of the items have an "Add to Cart" button underneath them. When this button is clicked, the item is added to cart. If this button is clicked again,…