Commit 474af7fe764 for woocommerce
commit 474af7fe7645776d2a127e2054845b8badd58c5a
Author: Jill Q. <jill.quek@automattic.com>
Date: Fri May 22 23:09:52 2026 +0800
Remove the task list reminder bar from Woo admin (#64353)
* Remove the task list reminder bar from Woo admin
The reminder bar is a custom full-width banner shown across Woo admin
pages (except Woo Home and active task pages) that nudges merchants
to complete setup tasks. In practice, the bar underperforms as an
engagement driver: merchants dismiss it more often than they click
through, and the overwhelming majority of task list engagement
happens on Woo Home — where the task list is the hero component.
The Finish setup entry in the activity panel remains in place as a
quieter, non-intrusive alternative that respects merchant attention
while keeping setup progress discoverable.
What's removed:
- The TasksReminderBar component (`task-lists/reminder-bar/`)
- The showReminderBar prop on BaseHeader and its two callsites
- The `woocommerce_task_list_reminder_bar_hidden` option + PHP cleanup
method (possibly_remove_reminder_bar) + the allow-list entry
- Tracks events: tasklist_reminder_bar_view/close/continue stop
firing (noted as deprecated for analytics consumers)
- e2e test setup lines that set the (now dead) option
Incidental cleanup:
- The useUpdateBodyMargin hook no longer returns its callback
(only the reminder bar imperatively invoked it). The hook still
syncs #wpbody margin on header resize, preserving layout behavior.
- Removed a PHPStan baseline entry for the deleted method.
Part of: RSM \u2014 Woo Sprinkles
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address CodeRabbit review feedback
- Remove no-op page fixtures in two e2e tests (product-delete,
create-product-attributes). After the reminder-bar setup was
removed, these fixtures just forwarded the default page fixture,
so the custom extension is unnecessary.
- Strengthen the "debounce multiple rapid resizes" test in
shared.test.js. The previous version only asserted the final
margin value after advancing timers; now also asserts that the
margin is NOT set during the rapid resize burst, so the test
actually verifies debounce behavior rather than just post-debounce
state.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Strengthen debounce test to assert coalescence
CodeRabbit flagged that the "should debounce multiple rapid resizes"
test could pass even if the debounced callback fired multiple times,
since the final marginTop would still be '100px' regardless.
Swap the static clientHeight value for a jest.fn getter so we can
count reads. The test now asserts:
- Before the debounce window elapses: clientHeight NOT read yet.
- After advancing timers: clientHeight read exactly once.
This actually proves the debounce coalesced three resize events into
a single clientHeight read, instead of just verifying the end state.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Document the mount-time coupling in the debounce test
CodeRabbit pointed out that the debounce test's pre-advance assertion
relies on a specific implementation detail: useUpdateBodyMargin's
initial mount measurement runs through the same 200ms debounce path,
not synchronously. Add a NOTE comment so future maintainers know
the test will need updating if the hook switches to a synchronous
mount-time measurement.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address review: restore PHP API stubs and add DB migration
mordeth's review on PR #64353 flagged two public PHP symbols removed without
a deprecation path, plus the orphaned option left in wp_options after the
reminder bar removal. All three are addressed here:
- TaskList::REMINDER_BAR_HIDDEN_OPTION is restored as a @deprecated constant
to prevent fatal "Undefined class constant" errors in third-party code.
- TaskList::possibly_remove_reminder_bar() is restored as a @deprecated stub
that calls wc_deprecated_function(). Same rationale.
- wc_update_1080_remove_task_list_reminder_bar_hidden_option() cleans up
the orphan woocommerce_task_list_reminder_bar_hidden option from existing
stores, following the established pattern used most recently for the
order attribution banner in PR #55852.
Changelog entry expanded to mention the REST options allowlist removal
and the deprecation stubs.
* Address dmallory42 review: move DB migration to 10.9.0, fix version annotations
The DB cleanup callback was registered under the already-released 10.8.0 bucket,
meaning stores already on 10.8.x would skip it. Moves to 10.9.0 per dmallory42's
review on PR #64353.
- Renamed wc_update_1080_remove_task_list_reminder_bar_hidden_option →
wc_update_1090_remove_task_list_reminder_bar_hidden_option and added a
10.9.0 update bucket in class-wc-install.php.
- Updated @deprecated and @since annotations in TaskList.php and
wc-update-functions.php from 10.8.0 → 10.9.0.
- Removed stale "optional reminder bar" mention from BaseHeader's docblock.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix db_update_callbacks sort order and alignment for 10.9.0 entry
The 10.9.0 bucket was inserted before 10.8.0-2, breaking the
WC_Install_Test::test_db_update_callbacks_versions sort-order assertion.
Also fixes the array double-arrow alignment to match surrounding entries.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Daniel Mallory <daniel.mallory@automattic.com>
Co-authored-by: Cvetan Cvetanov <cvetan.cvetanov@automattic.com>
diff --git a/plugins/woocommerce/changelog/remove-tasklist-reminder-bar b/plugins/woocommerce/changelog/remove-tasklist-reminder-bar
new file mode 100644
index 00000000000..a8e976ade73
--- /dev/null
+++ b/plugins/woocommerce/changelog/remove-tasklist-reminder-bar
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Remove the task list reminder bar from WooCommerce admin. The Finish setup entry in the activity panel remains as a quieter, non-obstructive alternative. The `woocommerce_task_list_reminder_bar_hidden` option is removed from the wc-admin REST options allowlist, and a one-time migration cleans it up from existing stores. `TaskList::possibly_remove_reminder_bar()` and `TaskList::REMINDER_BAR_HIDDEN_OPTION` are retained as deprecation stubs.
diff --git a/plugins/woocommerce/client/admin/client/header/embed.tsx b/plugins/woocommerce/client/admin/client/header/embed.tsx
index 4cfaac2aed5..fe89c6d7c75 100644
--- a/plugins/woocommerce/client/admin/client/header/embed.tsx
+++ b/plugins/woocommerce/client/admin/client/header/embed.tsx
@@ -11,7 +11,6 @@ import { recordEvent } from '@woocommerce/tracks';
* Internal dependencies
*/
import './style.scss';
-import { isTaskListActive } from '~/hooks/use-tasklists-state';
import { BaseHeader } from './shared';
import { useWpAdminChrome } from './use-wp-admin-chrome';
@@ -22,13 +21,6 @@ export const EmbedHeader = ( {
sections: string[];
query: Record< string, string >;
} ) => {
- const isReactifyPaymentsSettingsScreen = Boolean(
- query?.page === 'wc-settings' && query?.tab === 'checkout'
- );
- const showReminderBar = Boolean(
- isTaskListActive( 'setup' ) && ! isReactifyPaymentsSettingsScreen
- );
-
// Embed pages live on top of classic wp-admin screens. Detect the wp-admin
// chrome wp-admin already rendered so we can suppress the duplicate <h1>,
// proxy the Screen Options / Help dropdowns through floating-header icons,
@@ -105,7 +97,6 @@ export const EmbedHeader = ( {
isEmbedded={ true }
query={ query }
sections={ sections }
- showReminderBar={ showReminderBar }
suppressTitle={ hasWpAdminH1 }
compact={ hasWpAdminH1 }
trailingItems={ trailingItems }
diff --git a/plugins/woocommerce/client/admin/client/header/index.tsx b/plugins/woocommerce/client/admin/client/header/index.tsx
index 03b9675ce12..33f6e405161 100644
--- a/plugins/woocommerce/client/admin/client/header/index.tsx
+++ b/plugins/woocommerce/client/admin/client/header/index.tsx
@@ -19,7 +19,6 @@ import {
OrderAttributionInstallBanner,
BANNER_TYPE_HEADER as ORDER_ATTRIBUTION_INSTALL_BANNER_TYPE_HEADER,
} from '~/order-attribution-install-banner';
-import { isTaskListActive } from '~/hooks/use-tasklists-state';
import { BaseHeader } from './shared';
export const PAGE_TITLE_FILTER = 'woocommerce_admin_header_page_title';
@@ -66,14 +65,11 @@ export const Header = ( {
const isAnalyticsOverviewScreen =
isWCAdmin() && getPath() === '/analytics/overview';
- const showReminderBar = Boolean( isTaskListActive( 'setup' ) );
-
return (
<BaseHeader
isEmbedded={ false }
sections={ sections }
query={ query }
- showReminderBar={ showReminderBar }
leftAlign={ ! showLaunchYourStoreStatus }
>
{ showLaunchYourStoreStatus && <LaunchYourStoreStatus /> }
diff --git a/plugins/woocommerce/client/admin/client/header/shared.tsx b/plugins/woocommerce/client/admin/client/header/shared.tsx
index 00a705c29fb..ab000f3253a 100644
--- a/plugins/woocommerce/client/admin/client/header/shared.tsx
+++ b/plugins/woocommerce/client/admin/client/header/shared.tsx
@@ -16,7 +16,6 @@ import {
/**
* Internal dependencies
*/
-import { TasksReminderBar } from '../task-lists/reminder-bar';
import useIsScrolled from '~/hooks/useIsScrolled';
export const useUpdateBodyMargin = ( {
@@ -60,8 +59,6 @@ export const useUpdateBodyMargin = ( {
wpBody.style.marginTop = '';
};
}, [ headerItemSlot?.fills, updateBodyMargin ] );
-
- return updateBodyMargin;
};
export const getPageTitle = ( sections: string[] ) => {
@@ -87,8 +84,8 @@ export const getPageTitle = ( sections: string[] ) => {
/**
* BaseHeader is a dumb layout component shared by Header (non-embedded WC
* admin pages) and EmbedHeader (overlay on top of classic wp-admin pages).
- * It owns the fixed-position bar, body-margin sync, slot rendering, and
- * the optional reminder bar. Anything wp-admin-specific (h1 suppression,
+ * It owns the fixed-position bar, body-margin sync, and slot rendering.
+ * Anything wp-admin-specific (h1 suppression,
* compact-bar mode, Screen Options / Help proxy icons) is the caller's
* responsibility — passed in via `suppressTitle`, `compact`, and the
* `trailingItems` slot.
@@ -96,7 +93,6 @@ export const getPageTitle = ( sections: string[] ) => {
export const BaseHeader = ( {
isEmbedded,
query,
- showReminderBar,
sections,
children,
leftAlign = true,
@@ -106,7 +102,6 @@ export const BaseHeader = ( {
}: {
isEmbedded: boolean;
query: Record< string, string >;
- showReminderBar: boolean;
sections: string[];
children?: React.ReactNode;
leftAlign?: boolean;
@@ -135,7 +130,7 @@ export const BaseHeader = ( {
const pageTitleSlot = useSlot( WC_HEADER_PAGE_TITLE_SLOT_NAME );
const hasPageTitleFills = Boolean( pageTitleSlot?.fills?.length );
const headerItemSlot = useSlot( WC_HEADER_SLOT_NAME );
- const updateBodyMargin = useUpdateBodyMargin( {
+ useUpdateBodyMargin( {
headerElement,
headerItemSlot,
} );
@@ -153,12 +148,6 @@ export const BaseHeader = ( {
} ) }
ref={ headerElement }
>
- { showReminderBar && (
- <TasksReminderBar
- updateBodyMargin={ updateBodyMargin }
- taskListId="setup"
- />
- ) }
<div className="woocommerce-layout__header-wrapper">
<WooHeaderNavigationItem.Slot
fillProps={ { isEmbedded, query } }
diff --git a/plugins/woocommerce/client/admin/client/header/test/shared.test.js b/plugins/woocommerce/client/admin/client/header/test/shared.test.js
index a0fd63a9757..4bc77af98a9 100644
--- a/plugins/woocommerce/client/admin/client/header/test/shared.test.js
+++ b/plugins/woocommerce/client/admin/client/header/test/shared.test.js
@@ -67,15 +67,6 @@ jest.mock( '@woocommerce/admin-layout', () => ( {
},
} ) );
-jest.mock( '../../task-lists/reminder-bar', () => ( {
- TasksReminderBar: ( { taskListId } ) => (
- <div
- data-testid="tasks-reminder-bar"
- data-task-list-id={ taskListId }
- />
- ),
-} ) );
-
describe( 'getPageTitle', () => {
test( 'should get page title as the last item if section length is less than 3', () => {
const sections = [ 'Payments' ];
@@ -146,14 +137,13 @@ describe( 'useUpdateBodyMargin', () => {
const headerElement = { current: { clientHeight: 100 } };
const headerItemSlot = { fills: [] };
- // Create a test component to use the hook
+ // Create a test component to use the hook.
+ // The hook's useLayoutEffect triggers updateBodyMargin on mount.
const TestComponent = () => {
- const updateMargin = useUpdateBodyMargin( {
+ useUpdateBodyMargin( {
headerElement,
headerItemSlot,
} );
- // Call the function to verify it works
- updateMargin();
return null;
};
@@ -224,14 +214,13 @@ describe( 'useUpdateBodyMargin', () => {
const headerElement = { current: null };
const headerItemSlot = { fills: [] };
- // Create a test component to use the hook
+ // Create a test component to use the hook.
+ // The hook's useLayoutEffect triggers updateBodyMargin on mount.
const TestComponent = () => {
- const updateMargin = useUpdateBodyMargin( {
+ useUpdateBodyMargin( {
headerElement,
headerItemSlot,
} );
- // Call the function to verify it doesn't throw errors
- updateMargin();
return null;
};
@@ -246,36 +235,53 @@ describe( 'useUpdateBodyMargin', () => {
expect( true ).toBe( true );
} );
- test( 'should debounce multiple calls', () => {
- // Create a mock ref with clientHeight
- const headerElement = { current: { clientHeight: 100 } };
+ test( 'should debounce multiple rapid resizes', () => {
+ // NOTE: This test couples to the hook's mount-time behavior.
+ // useUpdateBodyMargin's initial measurement runs through the same
+ // 200ms debounce path, so clientHeight is not read until timers
+ // advance. If a future refactor switches to a synchronous mount-time
+ // measurement, the pre-advance assertion below will need updating.
+
+ // Spy on clientHeight reads so we can assert the debounced update
+ // runs exactly once, not once per resize event.
+ const clientHeightGetter = jest.fn( () => 100 );
+ const headerElement = { current: {} };
+ Object.defineProperty( headerElement.current, 'clientHeight', {
+ get: clientHeightGetter,
+ } );
const headerItemSlot = { fills: [] };
- // Create a test component to use the hook
const TestComponent = () => {
- const updateMargin = useUpdateBodyMargin( {
+ useUpdateBodyMargin( {
headerElement,
headerItemSlot,
} );
-
- // Call updateBodyMargin multiple times
- updateMargin();
- updateMargin();
- updateMargin();
-
return null;
};
render( <TestComponent /> );
- // Fast-forward timers to trigger the debounced function
+ // Fire multiple rapid resize events without advancing timers.
+ // Each resize resets the 200ms debounce timer.
act( () => {
- jest.advanceTimersByTime( 200 );
+ window.dispatchEvent( new Event( 'resize' ) );
+ window.dispatchEvent( new Event( 'resize' ) );
+ window.dispatchEvent( new Event( 'resize' ) );
} );
- // Should only set margin once
+ // Before the debounce window elapses, nothing should have run yet:
+ // margin should not be set and clientHeight should not have been read.
const wpBody = document.querySelector( '#wpbody' );
+ expect( wpBody.style.marginTop ).toBe( '' );
+ expect( clientHeightGetter ).not.toHaveBeenCalled();
+
+ // After advancing past the debounce window, margin is applied once
+ // and clientHeight is read exactly once — proving coalescence.
+ act( () => {
+ jest.advanceTimersByTime( 200 );
+ } );
expect( wpBody.style.marginTop ).toBe( '100px' );
+ expect( clientHeightGetter ).toHaveBeenCalledTimes( 1 );
} );
} );
@@ -299,7 +305,6 @@ describe( 'BaseHeader', () => {
const props = {
isEmbedded: false,
query: {},
- showReminderBar: false,
sections: [ 'WooCommerce' ],
leftAlign: true,
};
@@ -313,31 +318,6 @@ describe( 'BaseHeader', () => {
// Check page title
expect( header.textContent ).toBe( 'WooCommerce' );
-
- // Check reminder bar is not rendered
- expect(
- screen.queryByTestId( 'tasks-reminder-bar' )
- ).not.toBeInTheDocument();
- } );
-
- test( 'should render with reminder bar when showReminderBar is true', () => {
- const props = {
- isEmbedded: false,
- query: {},
- showReminderBar: true,
- sections: [ 'WooCommerce' ],
- };
-
- render( <BaseHeader { ...props } /> );
-
- // Check reminder bar is rendered
- expect(
- screen.getByTestId( 'tasks-reminder-bar' )
- ).toBeInTheDocument();
- expect( screen.getByTestId( 'tasks-reminder-bar' ) ).toHaveAttribute(
- 'data-task-list-id',
- 'setup'
- );
} );
test( 'should render with is-scrolled class when isScrolled is true', () => {
@@ -347,7 +327,6 @@ describe( 'BaseHeader', () => {
const props = {
isEmbedded: false,
query: {},
- showReminderBar: false,
sections: [ 'WooCommerce' ],
};
@@ -364,7 +343,6 @@ describe( 'BaseHeader', () => {
const props = {
isEmbedded: false,
query: {},
- showReminderBar: false,
sections: [ 'WooCommerce' ],
leftAlign: false,
};
@@ -390,7 +368,6 @@ describe( 'BaseHeader', () => {
const props = {
isEmbedded: false,
query: {},
- showReminderBar: false,
sections: [ 'WooCommerce' ],
};
@@ -404,7 +381,6 @@ describe( 'BaseHeader', () => {
const props = {
isEmbedded: true,
query: { page: 'wc-admin' },
- showReminderBar: false,
sections: [ 'WooCommerce' ],
};
@@ -433,7 +409,6 @@ describe( 'BaseHeader', () => {
const props = {
isEmbedded: false,
query: {},
- showReminderBar: false,
sections: [ 'WooCommerce' ],
children: <div data-testid="child-component">Child Component</div>,
};
diff --git a/plugins/woocommerce/client/admin/client/task-lists/index.ts b/plugins/woocommerce/client/admin/client/task-lists/index.ts
index 5bdd85f9fec..b11706abb21 100644
--- a/plugins/woocommerce/client/admin/client/task-lists/index.ts
+++ b/plugins/woocommerce/client/admin/client/task-lists/index.ts
@@ -4,6 +4,5 @@
import './fills';
export * from './task-lists';
-export * from './reminder-bar';
export * from './progress-title';
export * from './components/placeholder';
diff --git a/plugins/woocommerce/client/admin/client/task-lists/reminder-bar/index.tsx b/plugins/woocommerce/client/admin/client/task-lists/reminder-bar/index.tsx
deleted file mode 100644
index 2fefa6d2dcb..00000000000
--- a/plugins/woocommerce/client/admin/client/task-lists/reminder-bar/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export * from './reminder-bar';
diff --git a/plugins/woocommerce/client/admin/client/task-lists/reminder-bar/reminder-bar.scss b/plugins/woocommerce/client/admin/client/task-lists/reminder-bar/reminder-bar.scss
deleted file mode 100644
index 6f3d4b1c30e..00000000000
--- a/plugins/woocommerce/client/admin/client/task-lists/reminder-bar/reminder-bar.scss
+++ /dev/null
@@ -1,30 +0,0 @@
-.woocommerce-layout__header-tasks-reminder-bar {
- height: 40px;
- background-color: #007cba;
- display: flex;
- justify-content: space-between;
- align-items: center;
- color: #fff;
- padding: 0 $gap-small;
-
- &::before {
- content: "";
- }
-
- button {
- &:hover {
- opacity: 0.7;
- color: inherit;
- }
-
- color: inherit;
- }
-
- a {
- color: inherit;
- }
-
- p {
- font-size: 13px;
- }
-}
diff --git a/plugins/woocommerce/client/admin/client/task-lists/reminder-bar/reminder-bar.tsx b/plugins/woocommerce/client/admin/client/task-lists/reminder-bar/reminder-bar.tsx
deleted file mode 100644
index fdf5eeb9049..00000000000
--- a/plugins/woocommerce/client/admin/client/task-lists/reminder-bar/reminder-bar.tsx
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * External dependencies
- */
-import { __, sprintf } from '@wordpress/i18n';
-import { useSelect, useDispatch } from '@wordpress/data';
-import {
- optionsStore,
- TaskType,
- getVisibleTasks,
- onboardingStore,
-} from '@woocommerce/data';
-import { Button } from '@wordpress/components';
-import { Link } from '@woocommerce/components';
-import { getAdminLink } from '@woocommerce/settings';
-import { close as closeIcon } from '@wordpress/icons';
-import interpolateComponents from '@automattic/interpolate-components';
-import { useEffect } from '@wordpress/element';
-import { getQuery } from '@woocommerce/navigation';
-import { recordEvent } from '@woocommerce/tracks';
-
-/**
- * Internal dependencies
- */
-import './reminder-bar.scss';
-
-type ReminderBarProps = {
- taskListId: string;
- updateBodyMargin: () => void;
-};
-
-type ReminderTextProps = {
- remainingCount: number | null;
- tracksProps: {
- completed: number;
- is_homescreen: boolean;
- is_active_task_page: boolean;
- };
-};
-
-const REMINDER_BAR_HIDDEN_OPTION = 'woocommerce_task_list_reminder_bar_hidden';
-
-const ReminderText = ( { remainingCount, tracksProps }: ReminderTextProps ) => {
- const translationText =
- remainingCount === 1
- ? /* translators: 1: remaining tasks count */
- __(
- '🎉 Almost there. Only {{strongText}}%1$d step left{{/strongText}} get your store up and running. {{setupLink}}Finish setup{{/setupLink}}',
- 'woocommerce'
- )
- : /* translators: 1: remaining tasks count */
- __(
- '🚀 You’re doing great! {{strongText}}%1$d steps left{{/strongText}} to get your store up and running. {{setupLink}}Continue setup{{/setupLink}}',
- 'woocommerce'
- );
-
- return (
- <p>
- { interpolateComponents( {
- mixedString: sprintf( translationText, remainingCount ),
- components: {
- strongText: <strong />,
- setupLink: (
- <Link
- href={ getAdminLink( 'admin.php?page=wc-admin' ) }
- onClick={ () =>
- recordEvent(
- 'tasklist_reminder_bar_continue',
- tracksProps
- )
- }
- type="wp-admin"
- >
- <></>
- </Link>
- ),
- },
- } ) }
- </p>
- );
-};
-
-export const TasksReminderBar = ( {
- taskListId,
- updateBodyMargin,
-}: ReminderBarProps ) => {
- const { updateOptions } = useDispatch( optionsStore );
- const {
- remainingCount,
- loading,
- taskListHidden,
- taskListComplete,
- reminderBarHidden,
- completedTasksCount,
- } = useSelect(
- ( select ) => {
- const {
- getTaskList,
- hasFinishedResolution: onboardingHasFinishedResolution,
- } = select( onboardingStore );
- const {
- getOption,
- hasFinishedResolution: optionHasFinishedResolution,
- } = select( optionsStore );
- const reminderBarHiddenOption = getOption(
- REMINDER_BAR_HIDDEN_OPTION
- );
- const taskList = getTaskList( taskListId );
- const taskListIsResolved = onboardingHasFinishedResolution(
- 'getTaskList',
- [ taskListId ]
- );
- const optionIsResolved = optionHasFinishedResolution( 'getOption', [
- REMINDER_BAR_HIDDEN_OPTION,
- ] );
-
- const visibleTasks = getVisibleTasks( taskList?.tasks || [] );
-
- const completedTasks =
- visibleTasks.filter( ( task: TaskType ) => task.isComplete ) ||
- [];
-
- const isResolved = taskListIsResolved && optionIsResolved;
-
- return {
- reminderBarHidden: reminderBarHiddenOption === 'yes',
- taskListHidden: isResolved ? taskList?.isHidden : false,
- taskListComplete: isResolved ? taskList?.isComplete : false,
- loading: ! isResolved,
- completedTasksCount: completedTasks.length,
- remainingCount: isResolved
- ? visibleTasks?.length - completedTasks.length
- : null,
- };
- },
- [ taskListId ]
- );
-
- const query = getQuery() as { [ key: string ]: string };
- const isHomescreen =
- query.page && query.page === 'wc-admin' && ! query.path;
- const isActiveTaskPage = Boolean( query.wc_onboarding_active_task );
-
- const isHidden =
- loading ||
- taskListHidden ||
- taskListComplete ||
- reminderBarHidden ||
- completedTasksCount === 0 ||
- isHomescreen ||
- isActiveTaskPage;
-
- useEffect( () => {
- updateBodyMargin();
- }, [ isHidden, updateBodyMargin ] );
-
- const tracksProps = {
- completed: completedTasksCount,
- is_homescreen: !! isHomescreen,
- is_active_task_page: isActiveTaskPage,
- };
-
- useEffect( () => {
- if ( loading || isHidden ) {
- return;
- }
-
- recordEvent( 'tasklist_reminder_bar_view', tracksProps );
- }, [ isHidden, loading ] );
-
- const onClose = () => {
- updateOptions( {
- [ REMINDER_BAR_HIDDEN_OPTION ]: 'yes',
- } );
- recordEvent( 'tasklist_reminder_bar_close', tracksProps );
- };
-
- if ( isHidden ) {
- return null;
- }
-
- return (
- <div className="woocommerce-layout__header-tasks-reminder-bar">
- <ReminderText
- remainingCount={ remainingCount }
- tracksProps={ tracksProps }
- />
- <Button isSmall onClick={ onClose } icon={ closeIcon } />
- </div>
- );
-};
diff --git a/plugins/woocommerce/includes/class-wc-install.php b/plugins/woocommerce/includes/class-wc-install.php
index 799d1d29bb3..f2a9ab9d378 100644
--- a/plugins/woocommerce/includes/class-wc-install.php
+++ b/plugins/woocommerce/includes/class-wc-install.php
@@ -331,6 +331,9 @@ class WC_Install {
'10.8.0-2' => array(
'wc_update_10802_restore_orders_meta_key_value_index',
),
+ '10.9.0' => array(
+ 'wc_update_1090_remove_task_list_reminder_bar_hidden_option',
+ ),
);
/**
diff --git a/plugins/woocommerce/includes/wc-update-functions.php b/plugins/woocommerce/includes/wc-update-functions.php
index a06659c8487..09fab2d9277 100644
--- a/plugins/woocommerce/includes/wc-update-functions.php
+++ b/plugins/woocommerce/includes/wc-update-functions.php
@@ -3534,3 +3534,15 @@ function wc_update_10802_restore_orders_meta_key_value_index(): void {
function wc_update_1080_backfill_email_template_sync_meta(): bool {
return WCEmailTemplateSyncBackfill::run();
}
+
+/**
+ * Remove the option woocommerce_task_list_reminder_bar_hidden.
+ * The task list reminder bar was removed in 10.9.0; this option is no longer used.
+ *
+ * @since 10.9.0
+ *
+ * @return void
+ */
+function wc_update_1090_remove_task_list_reminder_bar_hidden_option() {
+ delete_option( 'woocommerce_task_list_reminder_bar_hidden' );
+}
diff --git a/plugins/woocommerce/phpstan-baseline.neon b/plugins/woocommerce/phpstan-baseline.neon
index 4f007b91831..89a339b2dbf 100644
--- a/plugins/woocommerce/phpstan-baseline.neon
+++ b/plugins/woocommerce/phpstan-baseline.neon
@@ -47007,12 +47007,6 @@ parameters:
count: 1
path: src/Admin/Features/OnboardingTasks/TaskList.php
- -
- message: '#^Method Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\TaskList\:\:possibly_remove_reminder_bar\(\) has no return type specified\.$#'
- identifier: missingType.return
- count: 1
- path: src/Admin/Features/OnboardingTasks/TaskList.php
-
-
message: '#^Method Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\TaskList\:\:possibly_track_completion\(\) has no return type specified\.$#'
identifier: missingType.return
diff --git a/plugins/woocommerce/src/Admin/API/Options.php b/plugins/woocommerce/src/Admin/API/Options.php
index 12bdd0c5558..b608334b1d4 100644
--- a/plugins/woocommerce/src/Admin/API/Options.php
+++ b/plugins/woocommerce/src/Admin/API/Options.php
@@ -197,7 +197,6 @@ class Options extends \WC_REST_Data_Controller {
'woocommerce_admin_install_timestamp',
'woocommerce_task_list_tracked_completed_tasks',
'woocommerce_show_marketplace_suggestions',
- 'woocommerce_task_list_reminder_bar_hidden',
'wc_connect_options',
'woocommerce_admin_created_default_shipping_zones',
'woocommerce_admin_reviewed_default_shipping_zones',
diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php
index 07d22f8aa3a..b70b1445f60 100644
--- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php
+++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php
@@ -6,7 +6,6 @@
namespace Automattic\WooCommerce\Admin\Features\OnboardingTasks;
use Automattic\WooCommerce\Admin\Features\OnboardingTasks\Task;
-use Automattic\WooCommerce\Admin\WCAdminHelper;
/**
@@ -29,7 +28,11 @@ class TaskList {
const COMPLETED_OPTION = 'woocommerce_task_list_completed_lists';
/**
- * Option name of hidden reminder bar.
+ * Option name of the dismissed reminder bar option.
+ *
+ * @deprecated 10.9.0 The reminder bar feature was removed; this option is no longer used.
+ * Retained as a stub to avoid fatal errors in third-party code that
+ * references the constant.
*/
const REMINDER_BAR_HIDDEN_OPTION = 'woocommerce_task_list_reminder_bar_hidden';
@@ -148,8 +151,6 @@ class TaskList {
$task = new $class( $this );
$this->add_task( $task );
}
-
- $this->possibly_remove_reminder_bar();
}
/**
@@ -405,20 +406,6 @@ class TaskList {
return get_option( 'woocommerce_task_list_keep_completed', 'no' );
}
- /**
- * Remove reminder bar four weeks after store creation.
- */
- public static function possibly_remove_reminder_bar() {
- $bar_hidden = get_option( self::REMINDER_BAR_HIDDEN_OPTION, 'no' );
- $active_for_four_weeks = WCAdminHelper::is_wc_admin_active_for( WEEK_IN_SECONDS * 4 );
-
- if ( 'yes' === $bar_hidden || ! $active_for_four_weeks ) {
- return;
- }
-
- update_option( self::REMINDER_BAR_HIDDEN_OPTION, 'yes' );
- }
-
/**
* Get the list for use in JSON.
*
@@ -452,4 +439,17 @@ class TaskList {
'keepCompletedTaskList' => $this->get_keep_completed_task_list(),
);
}
+
+ /**
+ * Possibly remove the task list reminder bar.
+ *
+ * @deprecated 10.9.0 The reminder bar feature was removed; this method is now a no-op.
+ * Retained as a stub to avoid fatal errors in third-party code that
+ * references the method.
+ *
+ * @return void
+ */
+ public static function possibly_remove_reminder_bar(): void {
+ wc_deprecated_function( __METHOD__, '10.9.0' );
+ }
}
diff --git a/plugins/woocommerce/tests/e2e-pw/tests/analytics/analytics-data.spec.ts b/plugins/woocommerce/tests/e2e-pw/tests/analytics/analytics-data.spec.ts
index 143132f2f3d..762f2fea974 100644
--- a/plugins/woocommerce/tests/e2e-pw/tests/analytics/analytics-data.spec.ts
+++ b/plugins/woocommerce/tests/e2e-pw/tests/analytics/analytics-data.spec.ts
@@ -16,11 +16,6 @@ const test = baseTest.extend( {
storageState: ADMIN_STATE_PATH,
page: async ( { page, restApi }, use ) => {
- // Disable the task list reminder bar, it can interfere with the quick actions
- await restApi.post( `${ WC_ADMIN_API_PATH }/options`, {
- woocommerce_task_list_reminder_bar_hidden: 'yes',
- } );
-
// Disable the orders report date tour
await restApi.post( `${ WC_ADMIN_API_PATH }/options`, {
woocommerce_orders_report_date_tour_shown: 'yes',
diff --git a/plugins/woocommerce/tests/e2e-pw/tests/product/create-product-attributes.spec.ts b/plugins/woocommerce/tests/e2e-pw/tests/product/create-product-attributes.spec.ts
index e921d1ca19c..d577a553a91 100644
--- a/plugins/woocommerce/tests/e2e-pw/tests/product/create-product-attributes.spec.ts
+++ b/plugins/woocommerce/tests/e2e-pw/tests/product/create-product-attributes.spec.ts
@@ -1,10 +1,7 @@
/**
* External dependencies
*/
-import {
- WC_API_PATH,
- WC_ADMIN_API_PATH,
-} from '@woocommerce/e2e-utils-playwright';
+import { WC_API_PATH } from '@woocommerce/e2e-utils-playwright';
import type { Page } from '@playwright/test';
/**
@@ -38,13 +35,6 @@ const productAttributes = [
const test = baseTest.extend( {
storageState: ADMIN_STATE_PATH,
- page: async ( { page, restApi }, use ) => {
- await restApi.put( `${ WC_ADMIN_API_PATH }/options`, {
- woocommerce_task_list_reminder_bar_hidden: 'yes',
- } );
-
- await use( page );
- },
product: async ( { restApi }, use ) => {
let product = getFakeProduct( { type: 'variable' } );
diff --git a/plugins/woocommerce/tests/e2e-pw/tests/product/product-delete.spec.ts b/plugins/woocommerce/tests/e2e-pw/tests/product/product-delete.spec.ts
index b33272714d0..9fceb27f186 100644
--- a/plugins/woocommerce/tests/e2e-pw/tests/product/product-delete.spec.ts
+++ b/plugins/woocommerce/tests/e2e-pw/tests/product/product-delete.spec.ts
@@ -1,10 +1,7 @@
/**
* External dependencies
*/
-import {
- WC_API_PATH,
- WC_ADMIN_API_PATH,
-} from '@woocommerce/e2e-utils-playwright';
+import { WC_API_PATH } from '@woocommerce/e2e-utils-playwright';
/**
* Internal dependencies
@@ -38,14 +35,6 @@ const test = baseTest.extend( {
}
}
},
- page: async ( { page, restApi }, use ) => {
- // Disable the task list reminder bar, it can interfere with the quick actions
- await restApi.post( `${ WC_ADMIN_API_PATH }/options`, {
- woocommerce_task_list_reminder_bar_hidden: 'yes',
- } );
-
- await use( page );
- },
} );
test( 'can delete a product from edit view', async ( { page, product } ) => {