wc_rest_urlencode_rfc3986( string|array $value )

Encodes a value according to RFC 3986.


Description Description

Supports multidimensional arrays.


Parameters Parameters

$value

(Required) The value to encode.


Top ↑

Return Return

(string|array) Encoded values.


Top ↑

Source Source

File: includes/wc-rest-functions.php

function wc_rest_urlencode_rfc3986( $value ) {
	if ( is_array( $value ) ) {
		return array_map( 'wc_rest_urlencode_rfc3986', $value );
	}

	return str_replace( array( '+', '%7E' ), array( ' ', '~' ), rawurlencode( $value ) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.