diff --git a/plugins/woocommerce/changelog/update-purge-cache-siteground-wpengine b/plugins/woocommerce/changelog/update-purge-cache-siteground-wpengine new file mode 100644 index 00000000000..03183c43623 --- /dev/null +++ b/plugins/woocommerce/changelog/update-purge-cache-siteground-wpengine @@ -0,0 +1,4 @@ +Significance: patch +Type: update + +Invalidate cache for SiteGround Speed Optimizer diff --git a/plugins/woocommerce/src/Internal/ComingSoon/ComingSoonCacheInvalidator.php b/plugins/woocommerce/src/Internal/ComingSoon/ComingSoonCacheInvalidator.php index a2101519adf..8c8b8a043a8 100644 --- a/plugins/woocommerce/src/Internal/ComingSoon/ComingSoonCacheInvalidator.php +++ b/plugins/woocommerce/src/Internal/ComingSoon/ComingSoonCacheInvalidator.php @@ -39,5 +39,10 @@ class ComingSoonCacheInvalidator { ) ); } + + // Invalidate the SiteGround Speed Optimizer cache. + if ( function_exists( '\sg_cachepress_purge_cache' ) ) { + \sg_cachepress_purge_cache(); + } } }