Klaviyo Site Banner | Q2 2025

Product Icon

PayPal Payments for WooCommerce

PayPal’s brand recognition helps give customers the confidence to buy. PayPal’s all-in-one checkout solution allows you to offer PayPal, Venmo (US), Pay Later, credit and debit cards, country-specific payment options and more.

Add Filter to Conditionally Load PayPal Scripts

Hi team 👋

I’m using the WooCommerce PayPal Payments plugin (v3.0.1) on a live site and noticed that PayPal scripts like the Smart Button, Google Pay, and Apple Pay SDKs are being loaded globally on every page—even when not needed.

This can negatively impact performance and page speed on non-commerce pages.

Feature Request:
Please consider adding a filter (e.g. woocommerce_paypal_payments_should_enqueue_scripts) that would allow developers to conditionally load PayPal scripts only on relevant pages like Cart, Checkout, Product, or Shop.

Example:
add_filter(‘woocommerce_paypal_payments_should_enqueue_scripts’, function($load) {
return is_cart() || is_checkout() || is_product() || is_shop();
});

This would give more control to developers and help improve Core Web Vitals without breaking checkout or button rendering.

Thanks for the awesome work on the plugin—looking forward to seeing this implemented 🙌

Author

kenneth75a700f370

Current Status

Open

Last updated: March 27, 2025

0 comments

Log in to comment on this feature request.