You should use Tools::getShopDomainSsl() too