Automattic\WooCommerce\Internal\Admin

SiteHealth::is_store_using_secure_connectionprivateWC 1.0

Determine whether the store is using HTTPS for WooCommerce pages.

Method of the class: SiteHealth{}

No Hooks.

Returns

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->is_store_using_secure_connection();

SiteHealth::is_store_using_secure_connection() code WC 11.0.0

private function is_store_using_secure_connection() {
	$shop_page = wc_get_page_permalink( 'shop' );

	return is_ssl() && 'https' === substr( $shop_page, 0, 5 );
}