Make wc_get_endpoint_url() compatible with WordPress use_trailing_slashes settings
This commit is contained in:
parent
d627a4bbb8
commit
c4afd53749
|
@ -101,10 +101,12 @@ function wc_get_endpoint_url( $endpoint, $value = '', $permalink = '' ) {
|
||||||
} else {
|
} else {
|
||||||
$query_string = '';
|
$query_string = '';
|
||||||
}
|
}
|
||||||
$url = trailingslashit( $permalink ) . trailingslashit( $endpoint );
|
$url = trailingslashit( $permalink );
|
||||||
|
|
||||||
if ( $value ) {
|
if ( $value ) {
|
||||||
$url .= trailingslashit( $value );
|
$url .= trailingslashit( $endpoint ) . user_trailingslashit( $value );
|
||||||
|
} else {
|
||||||
|
$url .= user_trailingslashit( $endpoint );
|
||||||
}
|
}
|
||||||
|
|
||||||
$url .= $query_string;
|
$url .= $query_string;
|
||||||
|
|
Loading…
Reference in New Issue