Viewing 14 replies - 1 through 14 (of 14 total)
  • I’m also seeing this issue which is really bad for product sales!

    From Page Speed Insights:

    Reduce the impact of third-party code Third-party code blocked the main thread for 1,700 ms 
    /inner.html(m.stripe.network) 1 KiB 853 ms
    /out-4.5.40.js(m.stripe.network) 16 KiB 314 ms
    …js/controller-ec32839….js(js.stripe.com) 75 KiB 300 ms
    …js/shared-71fcab3….js(js.stripe.com) 47 KiB 141 ms
    /v3/?ver=3.0(js.stripe.com) 63 KiB 52 ms

    When I exclude the above using Perfmatters plugin it went from the score 27 to 53 in Page Speed Insights for Woo product pages.

    • This reply was modified 2 years, 6 months ago by Ben Andersen. Reason: Added performance scores before and after disabling scripts

    Do you find a solution for this?

    I have the same resources consuming with the plugin and is crashing my site.

    These JS files are unnecessary bloat on product pages which do not have payment buttons. I have downgraded to Stripe V 5.5.0 plugin to resolve the issue.

    @captaincrank Hello, can you tell me where you downloaded the previous version of the plugin

    @arquetipos Go here https://wordpress.org/plugins/woocommerce-gateway-stripe/advanced/ and you’ll find the version selector and download button at the bottom of the page.
    You can also get there by clicking the Development tab and then click the Advanced View link.

    A Z

    (@ahmedzeidan)

    I agree here, I found unnecessary Stripe JS lines being run on the product page although apple pay is disabled on the product page and Stripe should not run on that page.

    Hi there, @arquetipos!

    Let’s take a closer look at this. I understand that you have found a workaround fix by disabling the .JS with the PluginOrganizer Stripe plugin on your post type products, but for further review, could you can please share your System Status Report with us?

    You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, you can paste it into your reply here.

    Paul

    (@paulschiretz)

    Hi there, @logicwizards!

    I have the same issue on my site, just a quick look into your code shows the issue very clearly:

    File: /includes/class-wc-gateway-stripe.php Lines 405 to 416

    	public function payment_scripts() {
    		if (
    			! is_product()
    			&& ! WC_Stripe_Helper::has_cart_or_checkout_on_current_page()
    			&& ! isset( $_GET['pay_for_order'] ) // wpcs: csrf ok.
    			&& ! is_add_payment_method_page()
    			&& ! isset( $_GET['change_payment_method'] ) // wpcs: csrf ok.
    			&& ! ( ! empty( get_query_var( 'view-subscription' ) ) && is_callable( 'WCS_Early_Renewal_Manager::is_early_renewal_via_modal_enabled' ) && WCS_Early_Renewal_Manager::is_early_renewal_via_modal_enabled() )
    			|| ( is_order_received_page() )
    		) {
    			return;
    		}

    ! is_product() basically means whatever option is set is not taken into account just continue to enqueue the scripts on the product pages.

    From my understanding it should be something like this:

    	public function payment_scripts() {
    		if (
    			( ! is_product() || ( is_product() && $this->payment_request !== 'yes' ) )
    			&& ! WC_Stripe_Helper::has_cart_or_checkout_on_current_page()
    			&& ! isset( $_GET['pay_for_order'] ) // wpcs: csrf ok.
    			&& ! is_add_payment_method_page()
    			&& ! isset( $_GET['change_payment_method'] ) // wpcs: csrf ok.
    			&& ! ( ! empty( get_query_var( 'view-subscription' ) ) && is_callable( 'WCS_Early_Renewal_Manager::is_early_renewal_via_modal_enabled' ) && WCS_Early_Renewal_Manager::is_early_renewal_via_modal_enabled() )
    			|| ( is_order_received_page() )
    		) {
    			return;
    		}

    Would be really nice to have a fix merged for this!
    All the best,
    Paul

    • This reply was modified 2 years, 6 months ago by Paul.

    @paulschiretz have you implemented this fix in your environment? Can you confirm it works as intended?

    Paul

    (@paulschiretz)

    @seetiggergo i tried it on my local dev environment, seems to do the trick. BUT i got to be honest as far as my production site goes I’m still waiting for the woocommerce guys to reply to the ticket @galbaras created: https://github.com/woocommerce/woocommerce-gateway-stripe/issues/2065 let’s see what they have to add…

    Cheers,
    Paul

    @paulschiretz I went ahead and moved it into production and all seems to be functioning properly. We have been receiving orders just fine. This also really helped out the page speed scores. I did see this from Stripe…

    To best leverage Stripe’s advanced fraud functionality, include this script (stripe.js) on every page of your site, not just the checkout page. This allows Stripe to detect anomalous behavior that may be indicative of fraud as customers browse your website.

    Figured I would keep my eyes on things and see if we see any uptick in fraudulent transactions.

    Personally, I don’t get any fraud, so this could be a setting. Either way, it’s new, and new things should be tested and, if possible, released without changing previous behaviour. If not possible, the change should be made abundantly clear in the release notes.

    So far, the plugin’s had another release, yet the GitHub issue has seen 0 replies from the developers.

    Paul

    (@paulschiretz)

    Just as info if someone is interested: There is finally a pull request that fixes it.

    https://github.com/woocommerce/woocommerce-gateway-stripe/pull/2110

    Added it manually, works!

    Plugin Support Adam Heckler

    (@adamkheckler)

    Hey all! Since this is more of a bug report / enhancement request that’s being tracked on GitHub, I’m going to go ahead and mark this thread as solved. Any further discussion is better suited for the GitHub links above.

    Thanks to everyone for their input on this. 🙂 Hopefully we can get the PR merged and released shortly.

    Cheers!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Stripe plugin slowing down site’ is closed to new replies.