Merge pull request #5248 from maxrice/master

Use is_ssl() for get_woocommerce_api_url()
This commit is contained in:
Mike Jolley 2014-04-01 14:34:51 +01:00
commit 6ba84559d8
1 changed files with 2 additions and 2 deletions

View File

@ -385,7 +385,7 @@ function wc_setcookie( $name, $value, $expire = 0, $secure = false ) {
*/
function get_woocommerce_api_url( $path ) {
$url = get_home_url( null, 'wc-api/v' . WC_API::VERSION . '/', ( 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) ? 'https' : 'http' );
$url = get_home_url( null, 'wc-api/v' . WC_API::VERSION . '/', is_ssl() ? 'https' : 'http' );
if ( ! empty( $path ) && is_string( $path ) ) {
$url .= ltrim( $path, '/' );