WC_Webhook::get_api_version
API version.
Method of the class: WC_Webhook{}
No Hooks.
Returns
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() WC Webhook::get api version code WC 10.6.2
public function get_api_version( $context = 'view' ) {
$version = $this->get_prop( 'api_version', $context );
return $version > 0 ? 'wp_api_v' . $version : 'legacy_v3';
}