Skip to content

Instantly share code, notes, and snippets.

@ahawthorne
Created April 13, 2012 03:21
Show Gist options
  • Save ahawthorne/2373374 to your computer and use it in GitHub Desktop.
Save ahawthorne/2373374 to your computer and use it in GitHub Desktop.
Fix for Content Translation - Ubercart checkout SSL issue
<?php
function custom_url_rewrite_outbound(&$path, &$options, $original_path) {
global $base_url;
if (strstr($base_url, 'https')) {
switch (true) {
case ((bool) strstr($path, 'cart/checkout')):
case ((bool) strstr($path, 'uc_js_util')):
case ((bool) strstr($path, 'admin_menu')):
$options['base_url'] = str_replace('http','https',$options['base_url']);
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment