• Resolved Derek Wilcox

    (@themassapothecary)


    wp-content/plugins/woocommerce-square/assets/css/frontend/wc-square-cart-checkout-blocks.min.css?ver=4.3.1

    why is this above link preloaded by default? How do I make it not preloaded so on all pages it’s not needed it is not still loaded? I’ve dequeqed the script on certain pages bit it still loads because of the preload.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @themassapothecary

    The WooCommerce Square plugin preloads the squareblocks CSS on all pages to ensure a consistent and smooth user experience across your website. This is particularly useful for websites where the Square payment gateway or related features are used on multiple pages.

    However, if you wish to stop this CSS from preloading on all pages, you would need to modify the plugin’s code, which we generally do not recommend as it can lead to unexpected issues and conflicts. It might also be overwritten when the plugin updates.

    The dequeue script you’ve mentioned is a good approach, but preloading is a browser feature that fetches specified resources in the background, which might be why you’re still seeing the CSS loaded.

    We recommend consulting with a developer or someone familiar with WordPress and WooCommerce coding if you wish to proceed with this.

    Please note that any changes you make are at your own risk and may affect the functionality or appearance of your site.

    I wish I could help more, but hopefully, this gets you going in the right direction to get the job done.

    Thread Starter Derek Wilcox

    (@themassapothecary)

    honestly 90+% of eCommerce websites only need the script on checkout pages so it’s weird to me but regardless. I don’t want to alter the plugin code but there must be a way you can assist with a small snippet to take away the Preload. ID really appreciate it. If you can help with that I can add it via my child theme and be good to go.

    Hi @themassapothecary

    I totally understand you here.

    Unfortunately, custom coding is not something we can assist with directly. However, I’ll keep this thread open for a bit to see if anyone from the community can lend a hand.

    If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:

    Hope this helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why is squareblocks css preloaded on all pages?’ is closed to new replies.