• hello guys, I add this support ticket again, despite it’s the second one here.
    I alerted you several months ago about the problem about the requests that are made via the plugin on the checkout. On our checkout it still takes 5-7 seconds for the modal to show….

    There is a function that is being called 3 times… but it’s needed only 1 time. Also, there is a bug about the spinner loading. The code of the plugin blocks the asynchronous way of executing the code and waits for a request until it’s finished and then shows the loading spinner…. which in reality should be the opposite. The script code needs to be refactored.

    I have seen that you updated the plugin multiple times but this bug hasn’t been addressed since 10 months!!!
    Everytime, we need to apply a manual patch/fix to the code to fix this thing, and then the time is perfectly fine (1 sec). So again, pls evaluate this becuase IT’S NOT OUR SERVER, guaranteed.

    So I hope you address this issue soon this time!
    Thanks and congrats for the wonderful work with this plugin!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • to help you troubleshoot and provide a fix, pls look at the “modalCheckout.js” file.
    The delay comes from this line in the processOrder() function, see the line:
    $.ajaxSetup({async: false});

    That forces jQuery to make the AJAX request synchronously, which:

    Blocks the entire browser UI thread

    Delays showing the spinner

    Delays modal opening until the response is complete

    This is outdated and poor practice. It should instead use async requests and show the loading spinner immediately.

    Plugin Author ndeet

    (@ndeet)

    Hey there, sorry for the late responsue due to holidays.

    When you look at the line above that line that disables async behaviour it says:
    > // We need to make sure the order processing worked before returning from this function.

    This means there was some problem with the async behaviour and the order was not created for some reason. Maybe this has long been fixed in WooCommerce and this workaround is not needed anymore. I will do some tests and see if we can remove that part.

    ok, whatever.
    But still, the checkout takes 5-7 seconds to show the modal and no spinner appears. That’s seems to be a very SEVERE bug.
    So pls check this out and provide a fix.
    Thanks

    Plugin Author ndeet

    (@ndeet)

    Normally it would only block until the invoice is generated, so it could be slow if your BTCPay Server is slow with responding. If you generate an invoice in BTCPay itself is it fast?

    Anyway, I refactored the legacy checkout to avoid using async:false and also did the same for the new blocks checkout, can you try if it works for you? You can find the file here: https://github.com/btcpayserver/woocommerce-greenfield-plugin/issues/62#issuecomment-3067318250

    As it was quite some refactor would be nice if you could confirm it works. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Bug again not been solved….’ is closed to new replies.