* 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:
Jeff Stieler 2020-08-27 08:10:23 -04:00 committed by GitHub
parent 550445e1a4
commit 5e7f2af61d
6 changed files with 13 additions and 13 deletions

View File

@ -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' ] ) {

View File

@ -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 } />;

View File

@ -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' ) ],
],
} );
}

View File

@ -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,

View File

@ -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>' .

View File

@ -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',
)
);
}