Get the item that was just added (PHP)
-
When a user in my shop adds an item to his cart, he gets redirected to the cart page where a green message shows which item was just added (ajax is disabled).
I want to show different information based on the product that was added, but I can’t figure out how to get the id of the product.
I can’t just use the last item in cart, because that would always show the custom message, even when the product was not just added.
I can’t use the wc_add_to_cart_message filter because I need to create a new element above the message.
How could this be done?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Get the item that was just added (PHP)’ is closed to new replies.