Stripe files on Product Page
-
Hi,
I have been searching for days for a method to NOT LOAD anything from stripe, specially stripe hosted files, on Product Page but without luck and that impacts quite badly my google PageSpeed.
Worth mentioning that I don’t have Payment Request Button enabled at all and I tried the following methods, as described around the forum for this plugin:add_filter( 'wc_stripe_hide_payment_request_on_product_page', '__return_true' ); add_filter( 'wc_stripe_show_payment_request_on_checkout', '__return_false' );
remove_action( 'woocommerce_proceed_to_checkout', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 ); remove_action( 'woocommerce_proceed_to_checkout', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 ); add_action( 'woocommerce_before_cart_contents', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 ); add_action( 'woocommerce_before_cart_contents', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
Whatever I tried, the plugin still injects
<script type='text/javascript' src='https://js.stripe.com/v3/?ver=3.0' id='stripe-js'></script>
into my page and with that a bunch of other files are loaded.Is there a clear way to have the plugin files loaded only on checkout?
Thank you!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Stripe files on Product Page’ is closed to new replies.