Remove defunct filename prefix from feature classes.
This commit is contained in:
parent
d4d0a31486
commit
4356eef13d
|
@ -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',
|
||||
),
|
||||
),
|
||||
|
|
|
@ -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.
|
||||
*
|
|
@ -11,7 +11,7 @@ namespace Automattic\WooCommerce\Admin\Features;
|
|||
/**
|
||||
* Contains backend logic for the Analytics feature.
|
||||
*/
|
||||
class WC_Admin_Analytics {
|
||||
class Analytics {
|
||||
/**
|
||||
* Class instance.
|
||||
*
|
|
@ -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.
|
||||
*/
|
|
@ -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' ) );
|
|
@ -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.
|
||||
*
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue