diff --git a/plugins/woocommerce-admin/src/API/OnboardingProfile.php b/plugins/woocommerce-admin/src/API/OnboardingProfile.php index 73f23b6c194..b64f68e5884 100644 --- a/plugins/woocommerce-admin/src/API/OnboardingProfile.php +++ b/plugins/woocommerce-admin/src/API/OnboardingProfile.php @@ -11,7 +11,7 @@ namespace Automattic\WooCommerce\Admin\API; defined( 'ABSPATH' ) || exit; -use Automattic\WooCommerce\Admin\Features\WC_Admin_Onboarding; +use Automattic\WooCommerce\Admin\Features\Onboarding; /** * Onboarding Profile controller. @@ -236,7 +236,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', 'items' => array( - 'enum' => array_keys( WC_Admin_Onboarding::get_allowed_industries() ), + 'enum' => array_keys( Onboarding::get_allowed_industries() ), 'type' => 'string', ), ), @@ -248,7 +248,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', 'items' => array( - 'enum' => array_keys( WC_Admin_Onboarding::get_allowed_product_types() ), + 'enum' => array_keys( Onboarding::get_allowed_product_types() ), 'type' => 'string', ), ), diff --git a/plugins/woocommerce-admin/src/Features/WC_Admin_Activity_Panels.php b/plugins/woocommerce-admin/src/Features/ActivityPanels.php similarity index 98% rename from plugins/woocommerce-admin/src/Features/WC_Admin_Activity_Panels.php rename to plugins/woocommerce-admin/src/Features/ActivityPanels.php index 33142fbb23e..ce521c17068 100644 --- a/plugins/woocommerce-admin/src/Features/WC_Admin_Activity_Panels.php +++ b/plugins/woocommerce-admin/src/Features/ActivityPanels.php @@ -14,7 +14,7 @@ use Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Settings_Notes; /** * Contains backend logic for the activity panel feature. */ -class WC_Admin_Activity_Panels { +class ActivityPanels { /** * Class instance. * diff --git a/plugins/woocommerce-admin/src/Features/WC_Admin_Analytics.php b/plugins/woocommerce-admin/src/Features/Analytics.php similarity index 99% rename from plugins/woocommerce-admin/src/Features/WC_Admin_Analytics.php rename to plugins/woocommerce-admin/src/Features/Analytics.php index 7b8cebc41a7..12e71830bae 100644 --- a/plugins/woocommerce-admin/src/Features/WC_Admin_Analytics.php +++ b/plugins/woocommerce-admin/src/Features/Analytics.php @@ -11,7 +11,7 @@ namespace Automattic\WooCommerce\Admin\Features; /** * Contains backend logic for the Analytics feature. */ -class WC_Admin_Analytics { +class Analytics { /** * Class instance. * diff --git a/plugins/woocommerce-admin/src/Features/WC_Admin_Analytics_Dashboard.php b/plugins/woocommerce-admin/src/Features/AnalyticsDashboard.php similarity index 98% rename from plugins/woocommerce-admin/src/Features/WC_Admin_Analytics_Dashboard.php rename to plugins/woocommerce-admin/src/Features/AnalyticsDashboard.php index 1ac55134353..98a7b9c3e6c 100644 --- a/plugins/woocommerce-admin/src/Features/WC_Admin_Analytics_Dashboard.php +++ b/plugins/woocommerce-admin/src/Features/AnalyticsDashboard.php @@ -11,7 +11,7 @@ namespace Automattic\WooCommerce\Admin\Features; /** * Contains backend logic for the dashboard feature. */ -class WC_Admin_Analytics_Dashboard { +class AnalyticsDashboard { /** * Menu slug. */ diff --git a/plugins/woocommerce-admin/src/Features/WC_Admin_Onboarding.php b/plugins/woocommerce-admin/src/Features/Onboarding.php similarity index 99% rename from plugins/woocommerce-admin/src/Features/WC_Admin_Onboarding.php rename to plugins/woocommerce-admin/src/Features/Onboarding.php index 555706c67c6..948aa6c8be9 100644 --- a/plugins/woocommerce-admin/src/Features/WC_Admin_Onboarding.php +++ b/plugins/woocommerce-admin/src/Features/Onboarding.php @@ -13,7 +13,7 @@ use \Automattic\WooCommerce\Admin\WC_Admin_Loader; /** * Contains backend logic for the onboarding profile and checklist feature. */ -class WC_Admin_Onboarding { +class Onboarding { /** * Class instance. * @@ -54,7 +54,7 @@ class WC_Admin_Onboarding { } // Include WC Admin Onboarding classes. - WC_Admin_Onboarding_Tasks::get_instance(); + OnboardingTasks::get_instance(); add_action( 'woocommerce_components_settings', array( $this, 'component_settings' ), 20 ); // Run after WC_Admin_Loader. add_action( 'woocommerce_theme_installed', array( $this, 'delete_themes_transient' ) ); diff --git a/plugins/woocommerce-admin/src/Features/WC_Admin_Onboarding_Tasks.php b/plugins/woocommerce-admin/src/Features/OnboardingTasks.php similarity index 98% rename from plugins/woocommerce-admin/src/Features/WC_Admin_Onboarding_Tasks.php rename to plugins/woocommerce-admin/src/Features/OnboardingTasks.php index e6f5d3438c9..1a523aa9a29 100644 --- a/plugins/woocommerce-admin/src/Features/WC_Admin_Onboarding_Tasks.php +++ b/plugins/woocommerce-admin/src/Features/OnboardingTasks.php @@ -11,7 +11,7 @@ namespace Automattic\WooCommerce\Admin\Features; /** * Contains the logic for completing onboarding tasks. */ -class WC_Admin_Onboarding_Tasks { +class OnboardingTasks { /** * Class instance. * diff --git a/plugins/woocommerce-admin/src/WC_Admin_Loader.php b/plugins/woocommerce-admin/src/WC_Admin_Loader.php index bb1fbdb6cfb..27f338d4931 100644 --- a/plugins/woocommerce-admin/src/WC_Admin_Loader.php +++ b/plugins/woocommerce-admin/src/WC_Admin_Loader.php @@ -131,8 +131,8 @@ class WC_Admin_Loader { public static function load_features() { $features = self::get_features(); foreach ( $features as $feature ) { - $feature = strtolower( str_replace( '-', '_', $feature ) ); - $feature = 'Automattic\WooCommerce\Admin\Features\WC_Admin_' . ucwords( $feature, '_' ); + $feature = str_replace( '-', '', ucwords( strtolower( $feature ), '-' ) ); + $feature = 'Automattic\\WooCommerce\\Admin\\Features\\' . $feature; if ( class_exists( $feature ) ) { new $feature;