Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Eliminate all non-essential admin-ajax.php requests
- This topic has 6 replies, 5 voices, and was last updated 4 years, 7 months ago by EK.
- AuthorPosts
- March 27, 2020 at 7:52 pm #113531alexdeziParticipant
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!
- April 4, 2020 at 12:38 pm #115245WCFM ForumMember
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
- April 5, 2020 at 11:52 pm #115714EKParticipant
Just to add, is there a way to change the 60 seconds to a different value to preserve the functionality?
Thanks
- April 12, 2020 at 11:37 am #118298BingalMember
Yes possible. How much you want to set?
- April 12, 2020 at 2:16 pm #118384EKParticipant
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 - April 21, 2020 at 5:49 pm #121349SushobhanKeymaster
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! - May 1, 2020 at 8:22 pm #125463EKParticipant
Thanks a lot. Implemented for now 😉
Cheers,
- AuthorPosts
- You must be logged in to reply to this topic.