Support » Plugin: WooCommerce » wc_print_notices() does not display message on live server

  • I have a custom signin page template which using wc_print_notices() (along with woocommerce installed, of course) to display the error message when there is fail logged in.

    It is working fine in my local computer development environment, I can see the error messages displayed when there is failed log in by the user. The problem is, when I tested it on the live server, the error message does not displayed. However, I can see the Dom displayed for the error message.

    <ul class="woocommerce-error">
                <li></li>//no message displayed in this

    Seem it can detect the errors, but can’t display the text. I tried turning the debug mode on, but there is no errors show. So I guess, may be this has something to do with the server setting?? Any idea?

Viewing 2 replies - 1 through 2 (of 2 total)
  • try printing your notices directly using woocommerce_before_shop_loop or woocommerce_before_single_product action hook like

    add_action( ‘woocommerce_before_shop_loop’, ‘my_custom_notice’, 10 );
    add_action( ‘woocommerce_before_single_product’, ‘my_custom_notice’, 10 );

    function my_custom_notice() {
    $loginmessage=”;//custom login fail message
    return $loginmessage;

    I got it solved. Turn out is the ithemes security plugin that causing this. There is an option that hiding login message feature in the plugin. Turning it off, and it works again.
    Anyway, thanks for the reply.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wc_print_notices() does not display message on live server’ is closed to new replies.