Is there a way to test all possible notices that can appear in a WooCommerce store, so I can check they look OK?
As an alternative to stumbling around in the site trying to get messages to appear...
You can't list all WooCommerce notices (and it will not be useful as some 3rd party plugins add their own ones).
But there is 3 type of notices used on WooCommerce on Front end.
They all use a different template type located in woocommerce/templates/notices/
to be rendered. For each the html structure is as follow:
<div class="woocommerce-message" role="alert">A success message…</div>
<div class="woocommerce-info">A notice message…</div>
<div class="woocommerce-error" role="alert">An error message…</div>
Some of them can have additional html, like <strong>
, <em>
, <a>
… with specific tag classes.
Some third party plugins can add their own additional html.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.