WordPress at Your Fingertips
function is not described

WC_Webhook::get_new_delivery_id() public WC 2.2.0

Generate a new unique hash as a delivery id based on current time and wehbook id. Return the hash for inclusion in the webhook request.

{} It's a method of the class: WC_Webhook{}

No Hooks.

Return

String.

Usage

$WC_Webhook = new WC_Webhook();
$WC_Webhook->get_new_delivery_id();

Changelog

Since 2.2.0 Introduced.

Code of WC_Webhook::get_new_delivery_id() WC 5.9.0

public function get_new_delivery_id() {
	// Since we no longer use comments to store delivery logs, we generate a unique hash instead based on current time and webhook ID.
	return wp_hash( $this->get_id() . strtotime( 'now' ) );
}