WordPress at Your Fingertips
function is not described

WC_Webhook::set_api_version() public WC 3.0.0

Set API version.

{} It's a method of the class: WC_Webhook{}

No Hooks.

Return

null. Nothing.

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.

Code of WC_Webhook::set_api_version() WC 5.9.0

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 );
}