I'm trying to display multiple items (each with their own add to card button) on a single page; so that the buyer can add items to cart without going to an individual page.
I need to have the add to cart message displayed in the individual product's container. I am using wc_print_notices() call inside the price section of the loop for each product, but this only puts the message inside the first product instead of the one that triggered it.
Is there a way to check which product id generates the $message string? so that I might do some sort of if statement to call wc_print_notices() based on which add to cart button triggered it?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire