Merge pull request #5248 from maxrice/master
Use is_ssl() for get_woocommerce_api_url()
This commit is contained in:
commit
6ba84559d8
|
@ -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