WC_Webhook::get_api_version()
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() WC Webhook::get api version code WC 9.6.1
public function get_api_version( $context = 'view' ) { $version = $this->get_prop( 'api_version', $context ); return $version > 0 ? 'wp_api_v' . $version : 'legacy_v3'; }