is_shop()WC 1.0

Is_shop - Returns true when viewing the product type archive (shop).

No Hooks.

Return

true|false.

Usage

is_shop();

Examples

0

#1 Check if the current page is the home page of the store

if ( is_shop() ) {
	echo 'This is the home page of the store!';
}
else {
	echo 'This is some other page.';
}

is_shop() code WC 8.7.0

function is_shop() {
	return ( is_post_type_archive( 'product' ) || is_page( wc_get_page_id( 'shop' ) ) );
}