Analytics Charts Are blank

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 4 reply threads
  • Author
    Posts
    • #86390
      sdel_nevo
      Participant

      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.
    • #86392
      sdel_nevo
      Participant

      Hi

      forgot to attach the error from google console
      steve

      Attachments:
      You must be logged in to view attached files.
    • #86395
      sdel_nevo
      Participant

      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

    • #86774
      WCFM Forum
      Member

      Hi,

      Well, if you dequeue such js for the site there will be many more issues will come!

      Thank You

    • #86783
      sdel_nevo
      Participant

      Hi guys

      Yeah I have just found that out
      I have removed this code

      Steve

Viewing 4 reply threads
  • The topic ‘Analytics Charts Are blank’ is closed to new replies.