• Resolved warezio

    (@warezio)


    wc_print_notices()

    not showing because of <meta name=\”description\” %s content=\”%s\” />

    how to avoid?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    “how to avoid?”
    How to avoid what? Is this some sort of error message? You’re going to give a whole lot more information… for instance, what specifically is the problem you’re encountering, and how do I reproduce that problem?

    Thread Starter warezio

    (@warezio)

    Sorry, I was just in hurry. I cannot say this is an error.

    I’m using woocommerce plugin and there is a function that wc_print_notices().
    When some event action, wc_print_notices() shows a message about error, success, etc.

    But, since I installed All in One SEO Pack, wc_print_notices() not shows any messages.
    The page ‘edit-password’ is one of woocommerce shortcord template that user can change their password, if user enter something wrong data, it should show an error message.

    I traced source about wc_print_notices(), and I found some thing that makes wc_print_notices() called twice so the wc_clear_notices() called in wc_print_notice() that is why the message not shows up.
    I got some part of All in One SEO Pack which is below,

    /wp-content/plugins/all-in-one-seo-pack/aioseop_class.php line: 2562

    
    function get_post_description( $post ) {
    //...
    $content = do_shortcode( $content );
    //...
    

    * Page conditionals
    is_page() && is_singular() && is_object( $post ) && ! is_archive() && empty( $blog_page )

    when I just edited to // $content = do_shortcode( $content ); then wc_print_notices() message appears normally.
    I’m not sure yet how relative between them, but I guess there are some sort of relation with do_shortcode(). If there were some filters, would be avoid “Not showing message” when on any empty description page.

    What do you think is the best way to show wc_print_notices() message in shortcode page without description?

    Thread Starter warezio

    (@warezio)

    Never mind, it is not a problem.
    I put wc_print_notices() into the shortcode template, but it supposed not to be inside of shortcode.
    I closed this case.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wc_print_notices’ is closed to new replies.