woocommerce_webhook_secret
Get the secret used for generating the HMAC-SHA256 signature.
Использование
add_filter( 'woocommerce_webhook_secret', 'wp_kama_woocommerce_webhook_secret_filter', 10, 2 );
/**
* Function for `woocommerce_webhook_secret` filter-hook.
*
* @param string $context What the value is for. Valid values are 'view' and 'edit'.
* @param $id
*
* @return string
*/
function wp_kama_woocommerce_webhook_secret_filter( $context, $id ){
// filter...
return $context;
}
- $context(строка)
- What the value is for. Valid values are 'view' and 'edit'.
- $id
- -
Список изменений
| С версии 2.2.0 | Введена. |
Где вызывается хук
woocommerce_webhook_secret
woocommerce/includes/class-wc-webhook.php 715
return apply_filters( 'woocommerce_webhook_secret', $this->get_prop( 'secret', $context ), $this->get_id() );