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

@ -172,7 +172,7 @@ function get_woocommerce_currencies() {
'CAD' => __( 'Canadian Dollars', 'woocommerce' ), 'CAD' => __( 'Canadian Dollars', 'woocommerce' ),
'CLP' => __( 'Chilean Peso', 'woocommerce' ), 'CLP' => __( 'Chilean Peso', 'woocommerce' ),
'CNY' => __( 'Chinese Yuan', 'woocommerce' ), 'CNY' => __( 'Chinese Yuan', 'woocommerce' ),
'COP' => __( 'Colombian Peso', 'woocommerce' ), 'COP' => __( 'Colombian Peso', 'woocommerce' ),
'CZK' => __( 'Czech Koruna', 'woocommerce' ), 'CZK' => __( 'Czech Koruna', 'woocommerce' ),
'DKK' => __( 'Danish Krone', 'woocommerce' ), 'DKK' => __( 'Danish Krone', 'woocommerce' ),
'EUR' => __( 'Euros', 'woocommerce' ), 'EUR' => __( 'Euros', 'woocommerce' ),
@ -385,7 +385,7 @@ function wc_setcookie( $name, $value, $expire = 0, $secure = false ) {
*/ */
function get_woocommerce_api_url( $path ) { 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 ) ) { if ( ! empty( $path ) && is_string( $path ) ) {
$url .= ltrim( $path, '/' ); $url .= ltrim( $path, '/' );