Pro Sites returns https link on front end website creation.

Pro Sites returns https link on front end website creation after successful credit card transaction which causes clients to hit a 404 page since SSL certs are not installed on any of the subdomains (as intended).

My setup
- Wordpress Multisite w/Pro Sites - working
- 1 SSL Cert installed on primary domain - working
- Force https just on primary domain and fix mixed content - working using Really Simple SSL plugin
- Force http on all subdomains - not working

After searching around these forums and google trying all different kinds of .htaccess tweaks, I stumbled upon a potential fix from the founder of Really Simple SSL which fixes the front sight creation, however, the side effect causes a No ‘Access-Control-Allow-Origin’ error when the subdomains attempt to make ajax calls to the primary domain (ie loading the media gallery) thus rending these sites useless.

Does anyone have any suggestions for tweaking this half fix below or any other suggestions?


add_filter("set_url_scheme", "rsssl_check_protocol_multisite", 20, 3 );
function rsssl_check_protocol_multisite($url, $scheme, $orig_scheme){
    if (is_multisite()) {
    //get blog id by url.
    //make sure the domain is with http, e.g.
    $domain = str_replace("https://","http://",$url);
    //remove http:// from the domain. e.g.
    $domain = str_replace("http://","",$domain);
    $blog_id = get_blog_id_from_url($domain);
    // exit if no blog id was found.
    if ($blog_id==0) return $url; //no blog id found

    //request the blog url and return it. If it is http, the returned url will now also be http.
    $url = get_blog_option($blog_id, "siteurl");
  return $url;