WC_Query::is_showing_page_on_front()privateWC 1.0

Are we currently on the front page?

Method of the class: WC_Query{}

No Hooks.

Return

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->is_showing_page_on_front( $q );
$q(WP_Query) (required)
Query instance.

WC_Query::is_showing_page_on_front() code WC 8.9.0

private function is_showing_page_on_front( $q ) {
	return ( $q->is_home() && ! $q->is_posts_page ) && 'page' === get_option( 'show_on_front' );
}