• Resolved Generosus

    (@generosus)


    Good Day,

    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 calling do_action request which can be used for this case. The hook used is: siteground_optimizer_flush_cache.

    Any takers? Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Dimitar Petrov

    (@demiro)

    Edit: @generosus, my previous reply was posted by mistake.

    I apologize for the inconvenience.

    Best Regards,
    Dimitar Petrov

    Thread Starter Generosus

    (@generosus)

    Hi @demiro,

    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.

    Thread Starter Generosus

    (@generosus)

    Update:

    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.

    Plugin Support Plamen M

    (@plamenm)

    Hello @generosus ,

    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

    Plugin Author Elena Chavdarova

    (@elenachavdarova)

    Hello @generosus,

    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Help Needed | Creating WP Filter to Purge SG Optimizer Cache’ is closed to new replies.