I need help with developing a code snippet (filter) that meets the following statement provided by SiteGround:
Consider creating a custom code snippet which will run the
wp_site_health_scheduled_check
cron event every time the SiteGround Optimizer plugin cache is flushed. When the cache is flushed we are callingdo_action
request which can be used for this case. The hook used is:siteground_optimizer_flush_cache
.
Any takers? Thank you.
]]>I apologize for the inconvenience.
Best Regards,
Dimitar Petrov
Since SiteGround refuses to provide the requested filter, I have decided to seek assistance using this channel. It has proven very helpful in the past.
Whenever I can, I reciprocate by helping others as well.
Next time, please don’t close topics as “Resolved” unless they actually are — or — please reopen them if you closed them by mistake.
Thank you.
]]>Just noticed.
It appears this topic was moved from the forum, “Fixing WordPress” (where coders usually help), to this forum.
Not sure what’s going on — nor who did this.
If this topic was moved by SiteGround, can you guys kindly move it back?
Thank you.
]]>We do not own the thread “Fixing WordPress” and I am afraid that we do not have control to restore it if it was deleted.
While the support section here is for support with existing features, if you need
coding assistance you may also post your requests in the popular freelancer sites.
Regards,
Plamen.M
Tech Support Team
You can use the following code snipped so the health status check is executed every time SiteGround Optimizer cache is flushed:
add_action( 'siteground_optimizer_flush_cache', function() {
wp_schedule_single_event( time(), 'wp_site_health_scheduled_check' );
});
Hope this helps!
Best Regards,
Elena