WC_Webhook::get_api_version()publicWC 3.0.0

API version.

Method of the class: WC_Webhook{}

No Hooks.

Return

String.

Usage

$WC_Webhook = new WC_Webhook();
$WC_Webhook->get_api_version( $context );
$context(string)
What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'

Changelog

Since 3.0.0 Introduced.

WC_Webhook::get_api_version() code WC 8.7.0

public function get_api_version( $context = 'view' ) {
	$version = $this->get_prop( 'api_version', $context );

	return 0 < $version ? 'wp_api_v' . $version : 'legacy_v3';
}