WordPress at a glance
function is not described

wc_generate_order_key() WC 3.5.4

Generate an order key with prefix.

Hooks from the function
Return

String. The order key.

Usage

wc_generate_order_key( $key );
$key(string)
Order key without a prefix. By default generates a 13 digit secret.

Changelog

Since 3.5.4 Introduced.

Code of wc_generate_order_key() WC 5.2.2

<?php
function wc_generate_order_key( $key = '' ) {
	if ( '' === $key ) {
		$key = wp_generate_password( 13, false );
	}

	return 'wc_' . apply_filters( 'woocommerce_generate_order_key', 'order_' . $key );
}