diff --git a/includes/api/class-wc-rest-settings-controller.php b/includes/api/class-wc-rest-settings-options-controller.php similarity index 99% rename from includes/api/class-wc-rest-settings-controller.php rename to includes/api/class-wc-rest-settings-options-controller.php index f591a77cec5..073d4bfa767 100644 --- a/includes/api/class-wc-rest-settings-controller.php +++ b/includes/api/class-wc-rest-settings-options-controller.php @@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) { * @version 2.7.0 * @since 2.7.0 */ -class WC_Rest_Settings_Controller extends WC_REST_Settings_API_Controller { +class WC_Rest_Settings_Options_Controller extends WC_REST_Settings_API_Controller { /** * WP REST API namespace/version. diff --git a/includes/class-wc-api.php b/includes/class-wc-api.php index eb278b6f92c..453dcdcf6a5 100644 --- a/includes/class-wc-api.php +++ b/includes/class-wc-api.php @@ -164,7 +164,7 @@ class WC_API extends WC_Legacy_API { include_once( 'api/class-wc-rest-report-sales-controller.php' ); include_once( 'api/class-wc-rest-report-top-sellers-controller.php' ); include_once( 'api/class-wc-rest-reports-controller.php' ); - include_once( 'api/class-wc-rest-settings-controller.php' ); + include_once( 'api/class-wc-rest-settings-options-controller.php' ); include_once( 'api/class-wc-rest-settings-groups-controller.php' ); include_once( 'api/class-wc-rest-tax-classes-controller.php' ); include_once( 'api/class-wc-rest-taxes-controller.php' ); @@ -194,7 +194,7 @@ class WC_API extends WC_Legacy_API { 'WC_REST_Report_Sales_Controller', 'WC_REST_Report_Top_Sellers_Controller', 'WC_REST_Reports_Controller', - 'WC_Rest_Settings_Controller', + 'WC_Rest_Settings_Options_Controller', 'WC_REST_Settings_Groups_Controller', 'WC_REST_Tax_Classes_Controller', 'WC_REST_Taxes_Controller', diff --git a/tests/unit-tests/api/settings.php b/tests/unit-tests/api/settings.php index ba4e5dd900f..6269aac2381 100644 --- a/tests/unit-tests/api/settings.php +++ b/tests/unit-tests/api/settings.php @@ -17,7 +17,7 @@ class Settings extends WC_Unit_Test_Case { global $wp_rest_server; $this->server = $wp_rest_server = new WP_Test_Spy_REST_Server; do_action( 'rest_api_init' ); - $this->endpoint = new WC_Rest_Settings_Controller(); + $this->endpoint = new WC_Rest_Settings_Options_Controller(); WC_Helper_Settings::register(); $this->user = $this->factory->user->create( array( 'role' => 'administrator', @@ -407,7 +407,7 @@ class Settings extends WC_Unit_Test_Case { * Tests the GET single setting route handler encountering an invalid setting type. */ public function test_get_setting_invalid_setting_type() { - $controller = $this->getMock( 'WC_Rest_Settings_Controller', array( 'get_group_settings', 'is_setting_type_valid' ) ); + $controller = $this->getMock( 'WC_Rest_Settings_Options_Controller', array( 'get_group_settings', 'is_setting_type_valid' ) ); $controller ->expects( $this->any() ) @@ -463,7 +463,7 @@ class Settings extends WC_Unit_Test_Case { /** * Test updating a bad setting ID. * @since 2.7.0 - * @covers WC_Rest_Settings_Controller::update_item + * @covers WC_Rest_Settings_Options_Controller::update_item */ public function test_update_setting_bad_setting_id() { wp_set_current_user( $this->user );