Custom WooCommerce notices not shown on Safari with CDN

Wordpress LScache Plugin: Custom WooCommerce notices not shown on Safari with CDN

Hello, I added a simple custom code to Basel theme to show a notification to the user when his review is pending for approval, but using Safari on desktop or Safari/Chrome on mobile the notification is not shown. If I try to leave a review with the Safari web inspector opened the notification is shown, so it seems to me that the problem is cache-related. The production site is under CDN so I have tried to add reviews on the staging site, without the CDN, and the notifications appear in all conditions. I also tried to add the parameters unapproved and moderation-hash (from WooCommerce) to the Do Not Cache Query Strings option in Cache > Excludes with no luck. Could someone help with this kind of problem? The report num from the LS cache plugin is WKTIPMYW, and the following is the code for the notification: add_action( comment_post, __NAMESPACE__ . add_unapproved_notice, 10, 1 ) function add_unapproved_notice( $comment_id ) : void $comment = get_comment( $comment_id ) if ( $comment && !(bool)$comment->comment_approved ) wc_add_notice( esc_html__( unapproved text, textdomain ), success ) Thanks try disable object cache ? Thank you qtwkr for your answer. The server shares the same configuration between production and staging site: the object cache (via Redis) is enabled in all sites, but only in the staging site the notifications appear correctly. hmmm? any other difference between stage/prod ? @CacheCrawler excuse me for the delay. No other differences between staging/production site. They run on the same site, under the same virtual host.
Do you need help?
We are online almost any time and ready to answer any question. The answer to your question will come faster than it takes you to release the mouse button.

Ask A Question