WP_CLI
RequestsLibrary::is_v2
Check if the current version is v2.
Method of the class: RequestsLibrary{}
No Hooks.
Returns
true|false. Whether the current version is v2.
Usage
$result = RequestsLibrary::is_v2();
RequestsLibrary::is_v2() RequestsLibrary::is v2 code WP-CLI 2.13.0-alpha
public static function is_v2() {
return self::get_version() === self::VERSION_V2;
}