WooCommerce Notice Messages, how do I edit them?

前端 未结 5 1491
别那么骄傲
别那么骄傲 2021-02-01 05:40

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

5条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 06:17

    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:

    
        
        

提交回复
热议问题