WC_Webhook::set_api_version()publicWC 3.0.0

Set API version.

Method of the class: WC_Webhook{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Webhook = new WC_Webhook();
$WC_Webhook->set_api_version( $version );
$version(int|string) (required)
REST API version.

Changelog

Since 3.0.0 Introduced.

WC_Webhook::set_api_version() code WC 8.6.1

public function set_api_version( $version ) {
	if ( ! is_numeric( $version ) ) {
		$version = $this->data_store->get_api_version_number( $version );
	}

	$this->set_prop( 'api_version', (int) $version );
}