Rename "profile" to "store details". (https://github.com/woocommerce/woocommerce-admin/pull/4965)
* Rename "profile" to "store details". * Missed some /profiler links. * Fix linter error. * Store details => Setup Wizard. * Rename task list item.
This commit is contained in:
parent
550445e1a4
commit
5e7f2af61d
|
@ -32,7 +32,7 @@ class Dashboard extends Component {
|
|||
! profileSkipped &&
|
||||
! window.wcAdminFeatures.homescreen
|
||||
) {
|
||||
getHistory().push( getNewPath( {}, `/profiler`, {} ) );
|
||||
getHistory().push( getNewPath( {}, '/setup-wizard', {} ) );
|
||||
}
|
||||
|
||||
if ( window.wcAdminFeatures[ 'analytics-dashboard/customizable' ] ) {
|
||||
|
|
|
@ -20,7 +20,7 @@ const Homescreen = ( { profileItems, query } ) => {
|
|||
const { completed: profilerCompleted, skipped: profilerSkipped } =
|
||||
profileItems || {};
|
||||
if ( ! profilerCompleted && ! profilerSkipped ) {
|
||||
getHistory().push( getNewPath( {}, `/profiler`, {} ) );
|
||||
getHistory().push( getNewPath( {}, '/setup-wizard', {} ) );
|
||||
}
|
||||
|
||||
return <Layout query={ query } />;
|
||||
|
|
|
@ -183,10 +183,10 @@ export const getPages = () => {
|
|||
if ( window.wcAdminFeatures.onboarding ) {
|
||||
pages.push( {
|
||||
container: ProfileWizard,
|
||||
path: '/profiler',
|
||||
path: '/setup-wizard',
|
||||
breadcrumbs: [
|
||||
...initialBreadcrumbs,
|
||||
[ '/profiler', __( 'Profiler', 'woocommerce-admin' ) ],
|
||||
[ '/setup-wizard', __( 'Setup Wizard', 'woocommerce-admin' ) ],
|
||||
],
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -97,13 +97,13 @@ export function getAllTasks( {
|
|||
const tasks = [
|
||||
{
|
||||
key: 'store_details',
|
||||
title: __( 'Store details', 'woocommerce-admin' ),
|
||||
title: __( 'Setup wizard', 'woocommerce-admin' ),
|
||||
container: null,
|
||||
onClick: () => {
|
||||
recordEvent( 'tasklist_click', {
|
||||
task_name: 'store_details',
|
||||
} );
|
||||
getHistory().push( getNewPath( {}, `/profiler`, {} ) );
|
||||
getHistory().push( getNewPath( {}, '/setup-wizard', {} ) );
|
||||
},
|
||||
completed: profilerCompleted,
|
||||
visible: true,
|
||||
|
|
|
@ -770,7 +770,7 @@ class Onboarding {
|
|||
public function is_loading( $is_loading ) {
|
||||
$show_profiler = self::should_show_profiler();
|
||||
$is_dashboard = ! isset( $_GET['path'] ); // phpcs:ignore csrf ok.
|
||||
$is_profiler = isset( $_GET['path'] ) && '/profiler' === $_GET['path']; // phpcs:ignore csrf ok.
|
||||
$is_profiler = isset( $_GET['path'] ) && '/setup-wizard' === $_GET['path']; // phpcs:ignore csrf ok.
|
||||
|
||||
if ( $is_profiler ) {
|
||||
return true;
|
||||
|
@ -915,7 +915,7 @@ class Onboarding {
|
|||
|
||||
$help_tab['content'] .= '<h3>' . __( 'Profile Setup Wizard', 'woocommerce-admin' ) . '</h3>';
|
||||
$help_tab['content'] .= '<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce-admin' ) . '</p>' .
|
||||
'<p><a href="' . wc_admin_url( '&path=/profiler' ) . '" class="button button-primary">' . __( 'Setup wizard', 'woocommerce-admin' ) . '</a></p>';
|
||||
'<p><a href="' . wc_admin_url( '&path=/setup-wizard' ) . '" class="button button-primary">' . __( 'Setup wizard', 'woocommerce-admin' ) . '</a></p>';
|
||||
|
||||
$help_tab['content'] .= '<h3>' . __( 'Task List', 'woocommerce-admin' ) . '</h3>';
|
||||
$help_tab['content'] .= '<p>' . __( 'If you need to enable or disable the task list, please click on the button below.', 'woocommerce-admin' ) . '</p>' .
|
||||
|
|
|
@ -69,7 +69,7 @@ class Loader {
|
|||
add_filter( 'woocommerce_shared_settings', array( __CLASS__, 'add_component_settings' ) );
|
||||
add_filter( 'admin_body_class', array( __CLASS__, 'add_admin_body_classes' ) );
|
||||
add_action( 'admin_menu', array( __CLASS__, 'register_page_handler' ) );
|
||||
add_action( 'admin_menu', array( __CLASS__, 'register_profiler_page' ) );
|
||||
add_action( 'admin_menu', array( __CLASS__, 'register_store_details_page' ) );
|
||||
add_filter( 'admin_title', array( __CLASS__, 'update_admin_title' ) );
|
||||
add_action( 'rest_api_init', array( __CLASS__, 'register_user_data' ) );
|
||||
add_action( 'in_admin_header', array( __CLASS__, 'embed_page_header' ) );
|
||||
|
@ -266,14 +266,14 @@ class Loader {
|
|||
}
|
||||
|
||||
/**
|
||||
* Registers the profiler page.
|
||||
* Registers the store details (profiler) page.
|
||||
*/
|
||||
public static function register_profiler_page() {
|
||||
public static function register_store_details_page() {
|
||||
wc_admin_register_page(
|
||||
array(
|
||||
'title' => 'Profiler',
|
||||
'title' => __( 'Setup Wizard', 'woocommerce-admin' ),
|
||||
'parent' => '',
|
||||
'path' => '/profiler',
|
||||
'path' => '/setup-wizard',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue