当前位置: 动力学知识库 > 问答 > 编程问答 >

wordpress - add a "added to cart message" to page

问题描述:

need some help, I added "the add to cart short code" to some items on my page. I wanted to add the add to cart notices to page as well.

I don't have a lot of experience with wordpress or woocommerce. I added the class "woocommerce-message" to a div and display this function

which does display a message, but it shows the div when there is no message

can someone one please show me the correct way to do this, a step by step example?

Thanks I appreciate any help

网友答案:

I believe your page needs to have wc_print_notices(); on it. Then the notices should appear when they are needed.

分享给朋友:
您可能感兴趣的文章:
随机阅读: