Rename endpoints to controllers
This commit is contained in:
parent
a5e4c3bf4d
commit
2eff709060
|
@ -28,7 +28,7 @@ class RestApi {
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $endpoints = [];
|
protected $controllers = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook into WordPress ready to init the REST API as needed.
|
* Hook into WordPress ready to init the REST API as needed.
|
||||||
|
@ -45,8 +45,8 @@ class RestApi {
|
||||||
$controllers = $namespace_class::get_controllers();
|
$controllers = $namespace_class::get_controllers();
|
||||||
|
|
||||||
foreach ( $controllers as $controller_name => $controller_class ) {
|
foreach ( $controllers as $controller_name => $controller_class ) {
|
||||||
$this->endpoints[ $namespace ][ $controller_name ] = new $controller_class();
|
$this->controllers[ $namespace ][ $controller_name ] = new $controller_class();
|
||||||
$this->endpoints[ $namespace ][ $controller_name ]->register_routes();
|
$this->controllers[ $namespace ][ $controller_name ]->register_routes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,16 +180,9 @@ install_deps() {
|
||||||
cd "wp-content/plugins/"
|
cd "wp-content/plugins/"
|
||||||
|
|
||||||
git clone --depth 1 https://github.com/woocommerce/woocommerce.git
|
git clone --depth 1 https://github.com/woocommerce/woocommerce.git
|
||||||
git clone --depth 1 https://github.com/woocommerce/woocommerce-admin.git
|
|
||||||
|
|
||||||
cd "woocommerce-admin"
|
|
||||||
composer install
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
cd "$WP_CORE_DIR"
|
cd "$WP_CORE_DIR"
|
||||||
php wp-cli.phar plugin activate woocommerce
|
php wp-cli.phar plugin activate woocommerce
|
||||||
php wp-cli.phar plugin activate woocommerce-admin
|
|
||||||
|
|
||||||
if [ "$BRANCH" != "" ]; then
|
if [ "$BRANCH" != "" ]; then
|
||||||
# Install the correct branch of the plugin, if running from Travis CI.
|
# Install the correct branch of the plugin, if running from Travis CI.
|
||||||
|
|
Loading…
Reference in New Issue