• Resolved adianghel

    (@adianghel)


    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!

    • This topic was modified 3 years, 6 months ago by adianghel.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hi @adianghel

    I’ve tried to replicate this and I cannot see this and with the Payment Request button disabled, there are no Stripe files loaded on my product pages.

    Can you send me a link to a product page where I can view this, please?

    I have a test product here – https://dev.doug.press/product/beanie/

    If you add that to the cart and go to checkout, you’ll see the Stripe payment gateway active but there are no Stripe.com files loaded on that specific product page.

    Thanks,

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    SAME ISSUE.

    And that so called test product above DOES load all the extra junk.

    Plugin Support Thu P. a11n

    (@thup90)

    Hi @mobber79 ,

    Per Forum Guidelines, please start a topic with the details of your issue so we can help you better.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Stripe files on Product Page’ is closed to new replies.