-
AuthorPosts
-
October 1, 2015 at 5:07 pm #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
October 1, 2015 at 6:02 pm #512322Hey profumopuntoit!
That script is probably required for the AJAX to work. Have you contacted Woocommerce support about this?
Best regards,
ElliottOctober 1, 2015 at 6:16 pm #512334I cannot because we are not entitled to receive their support
October 1, 2015 at 8:11 pm #512403Hey!
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 -
AuthorPosts
- You must be logged in to reply to this topic.
