WC_API_Authentication::urlencode_rfc3986( string|array $value )
Encodes a value according to RFC 3986. Supports multidimensional arrays.
Description Description
Parameters Parameters
- $value
-
(Required) The value to encode
Return Return
(string|array) Encoded values
Source Source
File: includes/legacy/api/v3/class-wc-api-authentication.php
public static function urlencode_rfc3986( $value ) { if ( is_array( $value ) ) { return array_map( array( 'WC_API_Authentication', 'urlencode_rfc3986' ), $value ); } else { // Percent symbols (%) must be double-encoded return str_replace( '%', '%25', rawurlencode( rawurldecode( $value ) ) ); } }
Changelog Changelog
Version | Description |
---|---|
2.4 | Introduced. |