plugin updates
This commit is contained in:
@@ -39,5 +39,10 @@ class ComingSoonCacheInvalidator {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Invalidate the SiteGround Speed Optimizer cache.
|
||||
if ( function_exists( '\sg_cachepress_purge_cache' ) ) {
|
||||
\sg_cachepress_purge_cache();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,17 +52,27 @@ class ComingSoonRequestHandler {
|
||||
|
||||
$coming_soon_template = get_query_template( 'coming-soon' );
|
||||
|
||||
if ( ! wc_current_theme_is_fse_theme() && $this->coming_soon_helper->is_store_coming_soon() ) {
|
||||
$is_fse_theme = wc_current_theme_is_fse_theme();
|
||||
$is_store_coming_soon = $this->coming_soon_helper->is_store_coming_soon();
|
||||
|
||||
if ( ! $is_fse_theme && $is_store_coming_soon ) {
|
||||
get_header();
|
||||
}
|
||||
|
||||
add_action(
|
||||
'wp_head',
|
||||
function () {
|
||||
echo "<meta name='woo-coming-soon-page' content='yes'>";
|
||||
}
|
||||
);
|
||||
|
||||
include $coming_soon_template;
|
||||
|
||||
if ( ! wc_current_theme_is_fse_theme() && $this->coming_soon_helper->is_store_coming_soon() ) {
|
||||
if ( ! $is_fse_theme && $is_store_coming_soon ) {
|
||||
get_footer();
|
||||
}
|
||||
|
||||
if ( wc_current_theme_is_fse_theme() ) {
|
||||
if ( $is_fse_theme ) {
|
||||
// Since we've already rendered a template, return null to ensure no other template is rendered.
|
||||
return null;
|
||||
} else {
|
||||
@@ -102,6 +112,17 @@ class ComingSoonRequestHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there is an exclusion.
|
||||
*
|
||||
* @since 9.1.0
|
||||
*
|
||||
* @param bool $is_excluded If the request should be excluded from Coming soon mode. Defaults to false.
|
||||
*/
|
||||
if ( apply_filters( 'woocommerce_coming_soon_exclude', false ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if the private link option is enabled.
|
||||
if ( get_option( 'woocommerce_private_link' ) === 'yes' ) {
|
||||
// Exclude users with a private link.
|
||||
|
||||
Reference in New Issue
Block a user