WC_Webhook::set_status()publicWC 3.2.0

Set status.

Method of the class: WC_Webhook{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Webhook = new WC_Webhook();
$WC_Webhook->set_status( $status );
$status(string) (required)
Status.

Changelog

Since 3.2.0 Introduced.

WC_Webhook::set_status() code WC 8.7.0

public function set_status( $status ) {
	if ( ! array_key_exists( $status, wc_get_webhook_statuses() ) ) {
		$status = 'disabled';
	}

	$this->set_prop( 'status', $status );
}