* Description: The WooCommerce core REST API, installed as a feature plugin for development and testing purposes. Requires WooCommerce 3.7+ and PHP 5.3+.
6
* Author: Automattic
7
* Author URI: https://woocommerce.com
8
* Version: 1.0.0-dev
9
* Requires PHP: 5.6
10
* License: GPLv3
11
*
12
* @package WooCommerce/RestApi
13
*/
14
15
defined( 'ABSPATH' ) || exit;
16
17
if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
18
return;
19
}
20
21
/**
22
* Get API feature plugin version and callback function.
23
*/
24
$version = include __DIR__ . '/version.php';
25
$init_callback = include __DIR__ . '/init.php';
26
27
/**
28
* This callback registers this version of the API with WooCommerce.
29
*/
30
$register_callback = function() use ( $version, $init_callback ) {
The method register() does not exist on WC_API. Did you maybe mean register_wp_admin_settings()?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
34
wc()->api->/** @scrutinizer ignore-call */
35
register( $version, $init_callback, __DIR__ );
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.