I\'m trying to figure out where WooCommerce creates it\'s messages for when there is a success, error or notice in WooCommerce. I want to edit those messages to fit the scenario
The filters mentioned here work fine for editing the message itself, but if you want to edit the actual HTML markup containing the notice message, then you need to use the notice templates under templates > notices
.
There are three different files here, each for the different kinds of notices. In my case, I wanted to add a class to the coupon applied successfully notice, so I copied success.php
over into my theme file. My code then looked like below: