Merge pull request #5248 from maxrice/master
Use is_ssl() for get_woocommerce_api_url()
This commit is contained in:
commit
6ba84559d8
|
@ -172,7 +172,7 @@ function get_woocommerce_currencies() {
|
|||
'CAD' => __( 'Canadian Dollars', 'woocommerce' ),
|
||||
'CLP' => __( 'Chilean Peso', 'woocommerce' ),
|
||||
'CNY' => __( 'Chinese Yuan', 'woocommerce' ),
|
||||
'COP' => __( 'Colombian Peso', 'woocommerce' ),
|
||||
'COP' => __( 'Colombian Peso', 'woocommerce' ),
|
||||
'CZK' => __( 'Czech Koruna', 'woocommerce' ),
|
||||
'DKK' => __( 'Danish Krone', 'woocommerce' ),
|
||||
'EUR' => __( 'Euros', 'woocommerce' ),
|
||||
|
@ -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, '/' );
|
||||
|
|
Loading…
Reference in New Issue