Ajax Load
-
Hello,
I’ve noticed that wc-ajax wcpbc_get_location fails to load (incomplete) after 21,86 sec, which takes a big chunk out of the site performance. I was wondering is there a simple way to reduce this, like only to have it load on woocommerce pages. I’ve found that you linked this script in one of the previous posts about this topic (and mentioned this is a replacement “wc-price-based-country-frontend”):
add_action( ‘wp_print_scripts’, ‘my_deregister_javascript’, 100 );
function my_deregister_javascript()
{
if ( is_page(‘YOUR PAGE NAME’) )
{
wp_deregister_script( ‘WORDPRESS JS file NAME’ );
}
}As I am not sure what exactly should I replace, so wanted to ask for a bit more of an insight – do I need to list every woocommerce page? Or is there a way to refer to all woocommerce pages?
Or even better, is there a way to fox the fail to load overall? Because I’m afraid the issue would still go on, just on woocommerce pages.
Thanks!
EDIT: It doesn’t always fail to load, but it does take longer than usual.
The page I need help with: [log in to see the link]
- The topic ‘Ajax Load’ is closed to new replies.