Automattic\WooCommerce\Blocks\Templates

ComingSoonTemplate{}WC 1.0

ComingSoonTemplate class.

No Hooks.

Usage

$ComingSoonTemplate = new ComingSoonTemplate();
// use class methods

Methods

  1. protected get_placeholder_page()
  2. public get_template_description()
  3. public get_template_title()
  4. protected is_active_template()

ComingSoonTemplate{} code WC 9.4.2

class ComingSoonTemplate extends AbstractPageTemplate {

	/**
	 * The slug of the template.
	 *
	 * @var string
	 */
	const SLUG = 'coming-soon';

	/**
	 * Returns the title of the template.
	 *
	 * @return string
	 */
	public function get_template_title() {
		return _x( 'Page: Coming soon', 'Template name', 'woocommerce' );
	}

	/**
	 * Returns the description of the template.
	 *
	 * @return string
	 */
	public function get_template_description() {
		return __( 'Page template for Coming soon page.', 'woocommerce' );
	}

	/**
	 * Returns the page object assigned to this template/page.
	 *
	 * @return \WP_Post|null Post object or null.
	 */
	protected function get_placeholder_page() {
		return null;
	}

	/**
	 * True when viewing the coming soon page.
	 *
	 * @return boolean
	 */
	protected function is_active_template() {
		return false;
	}
}