Apple Pay button not displaying correctly on product page

Hi @julie2009

The Apple Pay button’s display is not correct because the Stripe plugin’s stripe.css file is not being loaded on your product page. I see you’re using a cache, so that’s likely the culprit.

The CSS file is located at wp-content/plugins/woo-stripe-payment/assets/build/stripe.css

The location of that file changed in version 3.3.70 so your cache plugin is probably storing a reference to the old location.

Thanks

Hello @mrclayton

Thank you for your very quick reply to my question. I clear the page/network/object cache quite regularly. I’ve just gone through and cleared the cache on each product page individually. However, the Apply Pay button is still not displaying correctly on the product pages. Is there anything else I should look at? Thank you.

However, the Apply Pay button is still not displaying correctly on the product pages. 

The stripe.css file is enqueued at the same time as the Javascript files, so that means it’s not an issue of enqueuement or the incorrect action being triggered.

I noticed that none of the WooCommerce CSS files are being loaded as well. That would indicate you have some functionality that’s interfering with the loading of CSS files on your product pages. Or your cache is combining all CSS files into one and it’s excluding new files since it’s serving a cache.

This wouldn’t be an issue caused by the Stripe plugin.

I think I spoke too soon earlier. I waited a few more minutes and then tried again. It worked! The button is now displaying properly on the product pages. I will keep an eye on it. If it happens again, I will check my cache settings. I am using WP Rocket and I have the following checked: minify CSS files, remove unused CSS, minify JavaScript files, delay JavaScript execution. I have also reduced the cache lifespan to 10 hours. Do these settings seem okay?

Thank you.

Hi @julie2009

Do these settings seem okay?

Yes, those settings seem reasonable to me. The one thing I would change is make sure you add js.stripe.com to the list of scripts excluded from deferred and async loading. That can cause issues with load sequence of Stripe plugin dependencies.

If you have a moment we always appreciate a good review of the plugin.

https://projectdmc.org/support/plugin/woo-stripe-payment/reviews/

Kind Regards

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer