Disable wpmandrill stats (real disable) include mandrill API call
-
Hi there,
I use this fantastic plugin for a long time. I’ve a big problem:
I would like to disable stats for performance reason and I use filters for this:
add_filter(‘wpmandrill_enable_reports’, ‘__return_false’);
add_filter(‘wpmandrill_enable_widgets’, ‘__return_false’);This filters however disable report and widget but not the real call to mandrill API (getRawStatistics method).
My site gets slow when the system tries to update the stats and I get a db error WordPress database error Got a packet bigger than ‘max_allowed_packet’I’d put the same filter wpmandrill_enable_reports inside getRawStatistics method and if return false, response is: return array();
static function getRawStatistics() {
if(apply_filters( ‘wpmandrill_enable_reports’, true )){
//code
}
return $final;
}This avoid mandrill API call and consequently the site freezing.
What do you think?
Is there an alternative way to avoid this?Thank
David
- The topic ‘Disable wpmandrill stats (real disable) include mandrill API call’ is closed to new replies.