woocommerce_webhook_hash_algorithm хук-фильтрWC 2.2.0

Generate a base64-encoded HMAC-SHA256 signature of the payload body so the recipient can verify the authenticity of the webhook. Note that the signature is calculated after the body has already been encoded (JSON by default).


add_filter( 'woocommerce_webhook_hash_algorithm', 'wp_kama_woocommerce_webhook_hash_algorithm_filter', 10, 2 );

 * Function for `woocommerce_webhook_hash_algorithm` filter-hook.
 * @param  $payload 
 * @param  $id      
 * @return 
function wp_kama_woocommerce_webhook_hash_algorithm_filter( $payload, $id ){

	// filter...
	return $payload;

Список изменений

С версии 2.2.0 Введена.

Где вызывается хук

woocommerce/includes/class-wc-webhook.php 495
$hash_algo = apply_filters( 'woocommerce_webhook_hash_algorithm', 'sha256', $payload, $this->get_id() );

Где используется хук в WooCommerce

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