WordPress at Your Fingertips
function is not described

WC_Webhook::get_api_version() public WC 3.0.0

API version.

{} It's a 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.

Code of WC_Webhook::get_api_version() WC 5.9.0

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

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