WC_Webhook::get_secret()
Get the secret used for generating the HMAC-SHA256 signature.
Method of the class: WC_Webhook{}
Hooks from the method
Return
String
.
Usage
$WC_Webhook = new WC_Webhook(); $WC_Webhook->get_secret( $context );
- $context(string)
- What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'
Changelog
Since 2.2.0 | Introduced. |
WC_Webhook::get_secret() WC Webhook::get secret code WC 9.4.2
public function get_secret( $context = 'view' ) { return apply_filters( 'woocommerce_webhook_secret', $this->get_prop( 'secret', $context ), $this->get_id() ); }