WooCommerce - admin-ajax.php still needs a lot of time - how to dequeue
<p>I have a performance issue with my website currently. I can see the following chart:</p>

<p><a href="https://i.stack.imgur.com/NWBsn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NWBsn.png" alt="enter image description here"></a></p>

<p>I added the following code to my functions.php in order to only enqueue WooCommerce styles and scripts on the shop pages:</p>

<pre><code>function grd_woocommerce_script_cleaner() {

    // Remove the generator tag
    remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
    // Unless we're in the store, remove all the cruft!
    if ( ! is_woocommerce() &amp;&amp; ! is_cart() &amp;&amp; ! is_checkout() ) {
        wp_dequeue_style( 'woocommerce_frontend_styles' );
        wp_dequeue_style( 'woocommerce-general');
        wp_dequeue_style( 'woocommerce-layout' );
        wp_dequeue_style( 'woocommerce-smallscreen' );
        wp_dequeue_style( 'woocommerce_fancybox_styles' );
        wp_dequeue_style( 'woocommerce_chosen_styles' );
        wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
        wp_dequeue_style( 'select2' );
        wp_dequeue_script( 'wc-add-payment-method' );
        wp_dequeue_script( 'wc-lost-password' );
        wp_dequeue_script( 'wc_price_slider' );
        wp_dequeue_script( 'wc-single-product' );
        wp_dequeue_script( 'wc-add-to-cart' );
        wp_dequeue_script( 'wc-cart-fragments' );
        wp_dequeue_script( 'wc-credit-card-form' );
        wp_dequeue_script( 'wc-checkout' );
        wp_dequeue_script( 'wc-add-to-cart-variation' );
        wp_dequeue_script( 'wc-single-product' );
        wp_dequeue_script( 'wc-cart' );
        wp_dequeue_script( 'wc-chosen' );
        wp_dequeue_script( 'woocommerce' );
        wp_dequeue_script( 'prettyPhoto' );
        wp_dequeue_script( 'prettyPhoto-init' );
        wp_dequeue_script( 'jquery-blockui' );
        wp_dequeue_script( 'jquery-placeholder' );
        wp_dequeue_script( 'jquery-payment' );
        wp_dequeue_script( 'fancybox' );
        wp_dequeue_script( 'jqueryui' );
    }
}
add_action( 'wp_enqueue_scripts', 'grd_woocommerce_script_cleaner', 99 );
</code></pre>

<p>However I can still see these styles / scripts to be enqueued:</p>

<p>plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.min.js?ver=2.70
plugins/woocommerce/assets/js/frontend/woocommerce.min.js?ver=2.4.12</p>

<p><strong>Inline:</strong></p>

<pre><code>&lt;script type='text/javascript'&gt;
/* &lt;![CDATA[ */
var woocommerce_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/?wc-ajax=%%endpoint%%"};
/* ]]&gt; */
&lt;/script&gt;
</code></pre>

<p>Does anybody know how I can check which plugins are calling admin-ajax.php 5 times in total and how I can dequeue the other woocommerce scripts/styles?</p>

<p>Thank you!</p>