WordPress at Your Fingertips
function is not described

WC_HTTPS::force_https_page_link() public WC 1.0

Force a post link to be SSL if needed.

{} It's a method of the class: WC_HTTPS{}

No Hooks.

Return

String.

Usage

$result = WC_HTTPS::force_https_page_link( $link, $page_id );
$link(string) (required)
-
$page_id(int) (required)
-

Code of WC_HTTPS::force_https_page_link() WC 5.9.0

public static function force_https_page_link( $link, $page_id ) {
	if ( in_array( $page_id, array( get_option( 'woocommerce_checkout_page_id' ), get_option( 'woocommerce_myaccount_page_id' ) ) ) ) {
		$link = str_replace( 'http:', 'https:', $link );
	} elseif ( 'yes' === get_option( 'woocommerce_unforce_ssl_checkout' ) && ! wc_site_is_https() ) {
		$link = str_replace( 'https:', 'http:', $link );
	}
	return $link;
}