Hello, PremiumPetware,
We have conducted a code analysis of how the issue started and how it could be fixed and here are our results of testing:
1/ All plugins disabled except for needed ones (Elementor, WooCommerce, XStore Core, WPBakery.)
2/ XStore AMP activated
3/ Going to a product page from mobile and see FATAL error -> (private area image 01)
4/ Checking the same product page from the desktop and it is ok -> (private area image 02)
5/ We found that even if all plugins (most of them) are inactive then you still have an option named “Pantheon Page Cache” with the button to clear cache inside this settings page -> https://prnt.sc/UEtzMRMqv99G
6/ We decided to clear the cache and then check page from mobile device, and you know what? It does not show any error and works well -> (private area image 03)
7/ Then we checked this product page from the desktop and here come issues -> (private area image 04, 05)
8/ By clearing the cache again (inside Pantheon Page Cache panel) and rechecking the desktop product – it is ok again! But the AMP version is broken then.
Let’s sum up the results of our testing together.
The first time opening the page after clearing the cache will “keep” that version of page inside the cache independently on the device customer comes. Opening page from another device shows a broken structure (as it loads cache version “overlaping” on files loading for this page).
Also, it is important to mention that we tried to find this “step” where cache breaks the page. By adding “var_dump” php function in some places ( https://prnt.sc/NB5lgKLtFc1r ) “smartCard-inline”) we noticed the next situation -> (private area image 06). It means that cache makes some caching (sorry for the tautology) of this filter “woocommerce_locate_template” but not for this -> “wc_get_template_part”. Maybe developers of this cache plugin cache template files and as result it creates such issue with AMP version of web-sites.
Could you please, keep your mind in details provided above and have a conversation with your server to find a way to fully deactivate cache on mobile devices?
Note: for defining if it is a mobile device we use the default WP function – wp_is_mobile().
Kind Regards,
8theme team