Remove options to re-enable setup task list after completion (#52146)
* Remove re-eanble setup tasklist option * Add changelog * Remove re-eanble setup tasklist option from settings when setup task has previously completed * Use is_complete check instead
This commit is contained in:
parent
ebc486103c
commit
9c5e7beb71
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
Remove re-eanble setup tasklist option
|
|
@ -26,7 +26,6 @@ import HeaderImage from '../assets/completed-celebration-header.svg';
|
|||
|
||||
type TaskListCompletedHeaderProps = {
|
||||
hideTasks: () => void;
|
||||
keepTasks: () => void;
|
||||
customerEffortScore: boolean;
|
||||
};
|
||||
|
||||
|
@ -47,7 +46,7 @@ function getStoreAgeInWeeks( adminInstallTimestamp: number ) {
|
|||
|
||||
export const TaskListCompletedHeader: React.FC<
|
||||
TaskListCompletedHeaderProps
|
||||
> = ( { hideTasks, keepTasks, customerEffortScore } ) => {
|
||||
> = ( { hideTasks, customerEffortScore } ) => {
|
||||
const { updateOptions } = useDispatch( OPTIONS_STORE_NAME );
|
||||
const [ showCesModal, setShowCesModal ] = useState( false );
|
||||
const [ hasSubmittedScore, setHasSubmittedScore ] = useState( false );
|
||||
|
@ -190,14 +189,6 @@ export const TaskListCompletedHeader: React.FC<
|
|||
) }
|
||||
renderContent={ () => (
|
||||
<div className="woocommerce-task-card__section-controls">
|
||||
<Button
|
||||
onClick={ () => keepTasks() }
|
||||
>
|
||||
{ __(
|
||||
'Show setup task list',
|
||||
'woocommerce'
|
||||
) }
|
||||
</Button>
|
||||
<Button
|
||||
onClick={ () => hideTasks() }
|
||||
>
|
||||
|
|
|
@ -12,10 +12,8 @@ import HeaderImage from '../assets/task-list-completed.svg';
|
|||
|
||||
export const TaskListCompleted = ( {
|
||||
hideTasks,
|
||||
keepTasks,
|
||||
}: {
|
||||
hideTasks: () => void;
|
||||
keepTasks: () => void;
|
||||
} ) => {
|
||||
return (
|
||||
<>
|
||||
|
@ -37,10 +35,7 @@ export const TaskListCompleted = ( {
|
|||
'woocommerce'
|
||||
) }
|
||||
</h2>
|
||||
<Button isSecondary onClick={ keepTasks }>
|
||||
{ __( 'Keep list', 'woocommerce' ) }
|
||||
</Button>
|
||||
<Button isPrimary onClick={ hideTasks }>
|
||||
<Button variant="primary" onClick={ hideTasks }>
|
||||
{ __( 'Hide this list', 'woocommerce' ) }
|
||||
</Button>
|
||||
</div>
|
||||
|
|
|
@ -273,14 +273,10 @@ export const SetupTaskList: React.FC< TaskListProps > = ( {
|
|||
{ cesHeader ? (
|
||||
<TaskListCompletedHeader
|
||||
hideTasks={ hideTasks }
|
||||
keepTasks={ keepTasks }
|
||||
customerEffortScore={ true }
|
||||
/>
|
||||
) : (
|
||||
<TaskListCompleted
|
||||
hideTasks={ hideTasks }
|
||||
keepTasks={ keepTasks }
|
||||
/>
|
||||
<TaskListCompleted hideTasks={ hideTasks } />
|
||||
) }
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -83,6 +83,7 @@ class OnboardingHelper {
|
|||
$help_tab['content'] .= '<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .
|
||||
'<p><a href="' . wc_admin_url( '&path=/setup-wizard' ) . '" class="button button-primary">' . __( 'Setup wizard', 'woocommerce' ) . '</a></p>';
|
||||
|
||||
if ( ! $setup_list->is_complete() ) {
|
||||
$help_tab['content'] .= '<h3>' . __( 'Task List', 'woocommerce' ) . '</h3>';
|
||||
$help_tab['content'] .= '<p>' . __( 'If you need to enable or disable the task lists, please click on the button below.', 'woocommerce' ) . '</p>' .
|
||||
( $setup_list->is_hidden()
|
||||
|
@ -90,6 +91,7 @@ class OnboardingHelper {
|
|||
: '<p><a href="' . wc_admin_url( '&reset_task_list=0' ) . '" class="button button-primary">' . __( 'Disable', 'woocommerce' ) . '</a></p>'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $extended_list ) {
|
||||
$help_tab['content'] .= '<h3>' . __( 'Extended task List', 'woocommerce' ) . '</h3>';
|
||||
|
|
Loading…
Reference in New Issue