Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #512277

    Dear Kriesi

    we use wp rocket as a caching plugin and we get quite satisfactory results

    using pingdom tool we see that /?wc-ajax=get_refreshed_fragments takes half of the total load time.

    Googling seems to be a bug in WooCommerce and there are a few workaround proposed.
    We added in our functions.php
    ################################

    remove_action( ‘wp_ajax_nopriv_woocommerce_get_refreshed_fragments’, array( ‘WC_AJAX’, ‘get_refreshed_fragments’ ) );
    remove_action( ‘wp_ajax_woocommerce_get_refreshed_fragments’, array( ‘WC_AJAX’, ‘get_refreshed_fragments’ ) );
    ################################

    and

    ################################
    add_action( ‘init’, ‘my_deregister_heartbeat’, 1 );
    function my_deregister_heartbeat() {
    global $pagenow;

    if ( ‘post.php’ != $pagenow && ‘post-new.php’ != $pagenow )
    wp_deregister_script(‘heartbeat’);
    }
    ################################

    but they do not work

    it work instead:
    ################################
    add_action( ‘wp_print_scripts’, ‘de_script’, 100 );

    function de_script() {
    wp_dequeue_script( ‘wc-cart-fragments’ );

    return true;
    }
    ################################

    but this have an important impact because your beautiful cart is not loading

    Are you aware of this issue or I am the only Enfold client who has this problem? Do you have any solution?

    Thank you Mauro

    #512322

    Hey profumopuntoit!

    That script is probably required for the AJAX to work. Have you contacted Woocommerce support about this?

    Best regards,
    Elliott

    #512334

    I cannot because we are not entitled to receive their support

    #512403

    Hey!

    Your code is probably wrecking the AJAX scripts. If your having trouble with the load speed of Woocommerce then it would be best to contact them. We did not create the plugin so we have no idea what it could be.

    Regards,
    Elliott

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.