Automattic\WooCommerce\Internal\ComingSoon
ComingSoonHelper::is_current_page_coming_soon()
Return true if the current page should be shown in coming soon mode.
Method of the class: ComingSoonHelper{}
No Hooks.
Return
null
. Nothing (null).
Usage
$ComingSoonHelper = new ComingSoonHelper(); $ComingSoonHelper->is_current_page_coming_soon(): bool;
ComingSoonHelper::is_current_page_coming_soon() ComingSoonHelper::is current page coming soon code WC 9.8.1
public function is_current_page_coming_soon(): bool { // Early exit if coming soon mode not active. if ( $this->is_site_live() ) { return false; } if ( $this->is_site_coming_soon() ) { return true; } // Check the current page is a store page when in "store coming soon" mode. if ( $this->is_store_coming_soon() && WCAdminHelper::is_current_page_store_page() ) { return true; } // Default to false. return false; }