• Resolved impulsion

    (@impulsion)


    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' );

    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 2 years, 6 months ago by impulsion.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Saravanan S, a11n

    (@simplysaru)

    Hi @impulsion,

    There is no reason for Stripe to load on the product pages unless Payment request buttons are enabled. I tried page speed with and without enabling the buttons and I don’t see the Stripe js files loading when the buttons are disabled. Could you check on the buttons again?

    I would suggest you check for other plugins/theme that could be causing these files to be loaded on your site if the payment request buttons are disabled.

    Plugin Author ricardometring

    (@ricardoa8c)

    Hey @impulsion,

    It’s possible to disable payment request buttons from the product page from settings now. Navigate to WooCommerce > Settings > Payments > Stripe and remove “Product” from “Payment Request Button Locations”.

    Plugin Support Saravanan S, a11n

    (@simplysaru)

    Ricardo, Thanks for clarifying the next steps here.

    Thread Starter impulsion

    (@impulsion)

    Hi,

    I found where the problem comes from!

    The “YITH PayPal Payments for WooCommerce” plugin forces Stripe buttons to be enabled… how can i fix this? (I have to keep this plugin)

    Best regards

    Plugin Support Saravanan S, a11n

    (@simplysaru)

    Hi @impulsion,

    I’m afraid you would have to disable the plugin or work with the plugin developers to get this issue sorted out. Please reach out to their support team on this.

    Thanks for your understanding with this.

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