• Resolved Alex Kozack

    (@cawa-93)


    The plugin significantly worsens FCP performance because it loads its scripts (and therefore their dependencies) in the header of the web page.

    On my website, inspire_checkout_fields_checkout_js is loaded in the head. This forces the browser to load such scripts as jquery, jquery-ui-datepicker, jquery-ui-core in the head as well.

    The biggest problem here is that I can’t forcefully move inspire_checkout_fields_checkout_js and jquery to the footer of the page, because the plugin inserts the inline script what require jquery into the body. In my case, it is inserted right before the checkout form:

    <style>
    #billing_company_field abbr {
        display: none !important;
    }
    #billing_address_2_field abbr {
        display: none !important;
    }
    </style>
    <script type="text/javascript">
    jQuery(window).on('load', function() {
        jQuery('#billing_company_field').removeClass('validate-required');
        jQuery('#billing_address_2_field').removeClass('validate-required');
    });
    var fcf_ajaxurl = 'https://wordpress.local:8081/horoscope-store/wp-admin/admin-ajax.php';
    var inspire_upload_nonce = 'b20023f4e3';
    </script>

    This is expected to break if inspire_checkout_fields_checkout_js and jquery are moved to the footer.

    The inline script needs to be rewritten without depends on jquery.
    inspire_checkout_fields_checkout_js need to be moved to the footer of the page.

    Currently, loading inspire_checkout_fields_checkout_js and dependencies in the header costs me about 0.8 seconds FCP metric.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support rzepsen

    (@rzepsen)

    Hello @cawa-93

    Thank you for your message.

    I will pass on this problem to programmers. If there are any arrangements, I will let you know.

    Regards,

    Plugin Support rzepsen

    (@rzepsen)

    Hello @cawa-93

    We have just released the?Flexible Checkout Fields 3.5.15?update, containing?the proper fixes for the problem you’ve reported. The code you mentioned in a threat no longer depends on jQuery So please simply do the update.

    If the WordPress updater hasn’t informed you about the newer versions available, please check for the updates manually, by choosing the?Dashboard tab > Updates > Check Again?option.

    Please let me know if you have any further questions or if there is something more I can help you with.

    Kind regards,

    Plugin Support rzepsen

    (@rzepsen)

    Hello @cawa-93

    As we haven’t got any replies, I’m marking this topic as resolved for now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin insert inline script and break if move jquery into footer’ is closed to new replies.