Reorganize API classes.

This commit is contained in:
Jeff Stieler 2019-08-02 12:17:59 -06:00
parent 25ac10e5d5
commit fe3dc0dd7c
3 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@
* @package WooCommerce Admin/API
*/
namespace Automattic\WooCommerce\Admin\API\Notes\Actions;
namespace Automattic\WooCommerce\Admin\API;
defined( 'ABSPATH' ) || exit;
@ -19,7 +19,7 @@ use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes;
* @package WooCommerce/API
* @extends WC_REST_CRUD_Controller
*/
class Controller extends \Automattic\WooCommerce\Admin\API\Notes\Controller {
class NoteActions extends Notes {
/**
* Register the routes for admin notes.

View File

@ -7,7 +7,7 @@
* @package WooCommerce Admin/API
*/
namespace Automattic\WooCommerce\Admin\API\Notes;
namespace Automattic\WooCommerce\Admin\API;
defined( 'ABSPATH' ) || exit;
@ -20,7 +20,7 @@ use Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes;
* @package WooCommerce/API
* @extends WC_REST_CRUD_Controller
*/
class Controller extends \WC_REST_CRUD_Controller {
class Notes extends \WC_REST_CRUD_Controller {
/**
* Endpoint namespace.

View File

@ -33,8 +33,8 @@ class WC_Admin_Api_Init {
*/
public function rest_api_init() {
$controllers = array(
'Automattic\WooCommerce\Admin\API\Notes\Controller',
'Automattic\WooCommerce\Admin\API\Notes\Actions\Controller',
'Automattic\WooCommerce\Admin\API\Notes',
'Automattic\WooCommerce\Admin\API\NoteActions',
'WC_Admin_REST_Coupons_Controller',
'WC_Admin_REST_Customers_Controller',
'WC_Admin_REST_Data_Controller',