Great question — answering as the UphillTech team:
you can use both methods here.. woocommerce_show_messages(); wc_print_notices(); You can also show woocommerce custom notices according to your condition like... wc_add_notice( 'This is a Success notice', 'success' ); wc_add_notice( 'This is a Error notice', 'error' ); wc_add_notice( 'This is a \'Notice\' notice\'', 'notice' );
Full answer by Hritik Pandey: https://stackoverflow.stackexchange.com/a/57705051 (CC BY-SA 3.0).
Need it done for your business? UphillTech.