Woocommerce Paypal and Stripe Script Question

NEF

Free Member
Jan 14, 2008
290
16
Durham UK
Hello

Using woocommerce I see having paypal or stripe active on the main product page can cause page speed slowdown due to the excessive scripts, I'm maybe looking to disable these, BUT if I disable the plugin and leave it on checkout only, it seems the scripts still run on the main product pages still.

Is there a way to prevent this ?
 

fisicx

Moderator
Sep 12, 2006
46,766
8
15,418
Aldershot
www.aerin.co.uk
The easiest way to do this is add hooks to your theme to block the scripts from loading until the checkout page. A halfway decent developer can do this for you in an hour.

While they are doing this they can fix all the other scripts woo loads until they are needed.
 
Upvote 0

fisicx

Moderator
Sep 12, 2006
46,766
8
15,418
Aldershot
www.aerin.co.uk
They run those scripts as part of their fraud detection method.
Didn’t suggest disabling everything, just unhook until they are needed
 
Upvote 0

fisicx

Moderator
Sep 12, 2006
46,766
8
15,418
Aldershot
www.aerin.co.uk
Did a load of testing on this and investigated the code and many of the scripts only kick in on the actual checkout page. The rest of the time they are dormant but still load on each page.
 
Upvote 0

Latest Articles

Join UK Business Forums for free business advice