Automattic\WooCommerce\StoreApi\Utilities

JsonWebToken::to_base_64_url()private staticWC 1.0

Encodes a string to url safe base64.

Метод класса: JsonWebToken{}

Хуков нет.

Возвращает

Строку.

Использование

$result = JsonWebToken::to_base_64_url( $string );
$string(строка) (обязательный)
The string to be encoded.

Код JsonWebToken::to_base_64_url() WC 8.7.0

private static function to_base_64_url( string $string ) {
	return str_replace(
		array( '+', '/', '=' ),
		array( '-', '_', '' ),
		base64_encode( $string ) // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
	);
}