Eliminate all non-essential admin-ajax.php requests

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 6 reply threads
  • Author
    Posts
    • #113531
      alexdezi
      Participant

      Is there a way to eliminate all non-essential admin-ajax.php requests? The plugin seems to initiate a request every 60 seconds (I think?). It looks like they are to pull in new notifications like inquiries etc. is that correct?

      I have deactivated all admin notifications (I left e-mail notifications on), but I am still getting very high requests just and that’s just me testing the plugin.

      Is it possible to eliminate all those non-essential requests?

      Looking forward to help on this!

    • #115245
      WCFM Forum
      Keymaster

      HI,

      The plugin seems to initiate a request every 60 seconds (I think?). It looks like they are to pull in new notifications like inquiries etc. is that correct?

      – Right, you may disable this by adding this line to your site –

      add_filter( 'wcfm_is_allow_desktop_notification', '__return_false' );
      add_filter( 'wcfm_is_allow_new_message_check', '__return_false' );

      Add this code to your child theme’s functions.php
      In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

      Thank You

    • #115714
      EK
      Participant

      Just to add, is there a way to change the 60 seconds to a different value to preserve the functionality?

      Thanks

    • #118298
      Bingal
      Keymaster

      Yes possible. How much you want to set?

    • #118384
      EK
      Participant

      Around once every 10 minutes can be a good starting point 🙂 Whatever code you give, I will manually adjust the time value to suit the site needs 🙂
      Thanks a lot.

      Best Regards,
      EK

    • #121349
      Sushobhan
      Keymaster

      Hello,
      Please use the following filter for this purpose- apply_filters( 'wcfm_new_message_check_duration', 60000 ) (WCFM v6.4.8 or above). The value is in millisecond.
      Thanks!

    • #125463
      EK
      Participant

      Thanks a lot. Implemented for now 😉

      Cheers,

Viewing 6 reply threads
  • You must be logged in to reply to this topic.