Use dirname rather than __DIR__ and use parenthesis for WC_CLI
This commit is contained in:
parent
dff5fefe73
commit
e17d2819ea
|
@ -1,14 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* Enables WooCommerce, via the the command line.
|
||||
*
|
||||
* @package WooCommerce\CLI
|
||||
* @version 3.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables WooCommerce, via the the command line.
|
||||
*
|
||||
* @version 3.0.0
|
||||
* @package WooCommerce
|
||||
* @author WooCommerce
|
||||
* CLI class.
|
||||
*/
|
||||
class WC_CLI {
|
||||
/**
|
||||
|
@ -23,10 +26,10 @@ class WC_CLI {
|
|||
* Load command files.
|
||||
*/
|
||||
private function includes() {
|
||||
require_once __DIR__ . '/cli/class-wc-cli-runner.php';
|
||||
require_once __DIR__ . '/cli/class-wc-cli-rest-command.php';
|
||||
require_once __DIR__ . '/cli/class-wc-cli-tool-command.php';
|
||||
require_once __DIR__ . '/cli/class-wc-cli-update-command.php';
|
||||
require_once dirname( __FILE__ ) . '/cli/class-wc-cli-runner.php';
|
||||
require_once dirname( __FILE__ ) . '/cli/class-wc-cli-rest-command.php';
|
||||
require_once dirname( __FILE__ ) . '/cli/class-wc-cli-tool-command.php';
|
||||
require_once dirname( __FILE__ ) . '/cli/class-wc-cli-update-command.php';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,4 +42,4 @@ class WC_CLI {
|
|||
}
|
||||
}
|
||||
|
||||
new WC_CLI;
|
||||
new WC_CLI();
|
||||
|
|
Loading…
Reference in New Issue