Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Analytics › Analytics Charts Are blank
- This topic has 4 replies, 2 voices, and was last updated 4 years, 5 months ago by sdel_nevo.
- AuthorPosts
- October 12, 2019 at 1:24 am #86390sdel_nevoParticipant
Hi Guys
I have been working with my web hosts over the last few days to resolve a performance issue with my site.
it’s in relation to /?wc-ajax=get_refreshed_fragments which has been having quite a significant negative performance hit on the site
I have got this code which is added to my functions.php file and works brilliantly and massively reduces the load on the server
** Disable All WooCommerce Styles and Scripts Except for Shop Pages*/ add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_styles_scripts', 99 ); function dequeue_woocommerce_styles_scripts() { if ( function_exists( 'is_woocommerce' ) ) { if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { # Styles wp_dequeue_style( 'woocommerce-general' ); wp_dequeue_style( 'woocommerce-layout' ); wp_dequeue_style( 'woocommerce-smallscreen' ); wp_dequeue_style( 'woocommerce_frontend_styles' ); wp_dequeue_style( 'woocommerce_fancybox_styles' ); wp_dequeue_style( 'woocommerce_chosen_styles' ); wp_dequeue_style( 'woocommerce_prettyPhoto_css' ); # Scripts 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-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( 'fancybox' ); wp_dequeue_script( 'jqueryui' ); } } }
the only problem is, that when this code is in place the main analytics charts are blank with this URL /store-manager/analytics
do you know what I would need to add to the code above so that these analytics charts showed correctly? I know this issue is nothing to do with your code, but any help would be brilliant
Steve
Attachments:
You must be logged in to view attached files. - October 12, 2019 at 1:27 am #86392
- October 12, 2019 at 1:31 am #86395sdel_nevoParticipant
Hi
well well, the minute I posted the above I saw
wp_dequeue_script( ‘woocommerce’ );
ive commented that out and it works
been looking at that for hours lol,
Steve
- October 14, 2019 at 11:56 am #86774WCFM ForumKeymaster
Hi,
Well, if you dequeue such js for the site there will be many more issues will come!
Thank You
- October 14, 2019 at 12:11 pm #86783sdel_nevoParticipant
Hi guys
Yeah I have just found that out
I have removed this codeSteve
- AuthorPosts
- The topic ‘Analytics Charts Are blank’ is closed to new replies.