1 | <?php |
||
2 | /** |
||
3 | * Plugin Name: WooCommerce REST API |
||
4 | * Plugin URI: https://github.com/woocommerce/woocommerce-rest-api |
||
5 | * 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 ) { |
||
31 | if ( ! class_exists( '\WooCommerce\Core\PackageManager' ) ) { |
||
32 | return; |
||
33 | } |
||
34 | \WooCommerce\Core\PackageManager::register( 'woocommerce-rest-api', $version, $init_callback, __DIR__ ); |
||
0 ignored issues
–
show
|
|||
35 | }; |
||
36 | |||
37 | add_action( 'woocommerce_loaded', $register_callback ); |
||
38 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths