Automattic\WooCommerce\Internal\Utilities
LegacyRestApiStub::add_query_vars_for_legacy_rest_api_stub
Add the necessary request query variables for the Legacy REST API (either the dedicated extension if it's installed, or the stub otherwise).
Метод класса: LegacyRestApiStub{}
Хуков нет.
Возвращает
Массив. The extended query variables array.
Использование
$result = LegacyRestApiStub::add_query_vars_for_legacy_rest_api_stub( $vars );
- $vars(массив) (обязательный)
- The query variables array to extend.
Код LegacyRestApiStub::add_query_vars_for_legacy_rest_api_stub() LegacyRestApiStub::add query vars for legacy rest api stub WC 10.6.2
public static function add_query_vars_for_legacy_rest_api_stub( $vars ) {
$vars[] = 'wc-api-version';
$vars[] = 'wc-api-route';
$vars[] = 'wc-api';
return $vars;
}