Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove payouts rename notice overlay. #10039

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/update-9704-remove-payouts-rename-overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Remove the overlay that notices the rename from deposits to payouts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick and optional:

Remove spotlight notice announcing rename of deposit to payout.

2 changes: 0 additions & 2 deletions client/deposits/details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import {
} from 'multi-currency/interface/functions';
import { depositStatusLabels } from '../strings';
import './style.scss';
import { PayoutsRenameNotice } from '../rename-notice';
import { formatDateTimeFromString } from 'wcpay/utils/date-time';
import DateFormatNotice from 'wcpay/components/date-format-notice';

Expand Down Expand Up @@ -243,7 +242,6 @@ export const DepositDetails: React.FC< DepositDetailsProps > = ( {

return (
<Page>
<PayoutsRenameNotice />
<DateFormatNotice />
<TestModeNotice currentPage="deposits" isDetailsView={ true } />
<ErrorBoundary>
Expand Down
2 changes: 0 additions & 2 deletions client/deposits/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { __ } from '@wordpress/i18n';
import { TestModeNotice } from 'components/test-mode-notice';
import BannerNotice from 'components/banner-notice';
import DepositSchedule from 'components/deposits-overview/deposit-schedule';
import { PayoutsRenameNotice } from './rename-notice';
import { useAllDepositsOverviews } from 'data';
import { useSettings } from 'wcpay/data';
import DepositsList from './list';
Expand Down Expand Up @@ -152,7 +151,6 @@ const DepositsPage: React.FC = () => {
<Page>
<DateFormatNotice />
<TestModeNotice currentPage="deposits" />
<PayoutsRenameNotice />
<NextDepositNotice />
<DepositFailureNotice />
<DepositsList />
Expand Down
36 changes: 0 additions & 36 deletions client/deposits/rename-notice/header-image.svg

This file was deleted.

88 changes: 0 additions & 88 deletions client/deposits/rename-notice/index.tsx

This file was deleted.

77 changes: 0 additions & 77 deletions client/deposits/rename-notice/style.scss

This file was deleted.

This file was deleted.

49 changes: 0 additions & 49 deletions client/deposits/rename-notice/test/index.tsx

This file was deleted.

1 change: 0 additions & 1 deletion client/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ declare global {
fraudProtection: {
isWelcomeTourDismissed?: boolean;
};
isPayoutsRenameNoticeDismissed: boolean;
progressiveOnboarding?: {
isEnabled: boolean;
isComplete: boolean;
Expand Down
2 changes: 0 additions & 2 deletions client/overview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { useDisputes, useGetSettings, useSettings } from 'data';
import SandboxModeSwitchToLiveNotice from 'wcpay/components/sandbox-mode-switch-to-live-notice';
import './style.scss';
import BannerNotice from 'wcpay/components/banner-notice';
import { PayoutsRenameNotice } from 'wcpay/deposits/rename-notice';
import DateFormatNotice from 'wcpay/components/date-format-notice';

const OverviewPageError = () => {
Expand Down Expand Up @@ -197,7 +196,6 @@ const OverviewPage = () => {
{ showConnectionSuccess && <ConnectionSuccessNotice /> }
{ ! accountRejected && ! accountUnderReview && (
<ErrorBoundary>
<PayoutsRenameNotice />
<Welcome />

{ showTaskList && (
Expand Down
20 changes: 0 additions & 20 deletions client/overview/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,24 +352,4 @@ describe( 'Overview page', () => {

expect( query() ).not.toBeInTheDocument();
} );

it( 'shows payout rename notice if not yet dismissed', () => {
global.wcpaySettings.isPayoutsRenameNoticeDismissed = false;

render( <OverviewPage /> );

expect(
screen.queryByText( 'Deposits are now known as Payouts!' )
).toBeInTheDocument();
} );

it( 'does not display payout rename notice if already dismissed', () => {
global.wcpaySettings.isPayoutsRenameNoticeDismissed = true;

render( <OverviewPage /> );

expect(
screen.queryByText( 'Deposits are now known as Payouts!' )
).not.toBeInTheDocument();
} );
} );
1 change: 0 additions & 1 deletion includes/admin/class-wc-payments-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,6 @@ private function get_js_settings(): array {
'fraudProtection' => [
'isWelcomeTourDismissed' => WC_Payments_Features::is_fraud_protection_welcome_tour_dismissed(),
],
'isPayoutsRenameNoticeDismissed' => WC_Payments_Features::is_payouts_rename_notice_dismissed(),
'enabledPaymentMethods' => $this->get_enabled_payment_method_ids(),
'progressiveOnboarding' => $this->account->get_progressive_onboarding_details(),
'accountDefaultCurrency' => $this->account->get_account_default_currency(),
Expand Down
9 changes: 0 additions & 9 deletions includes/class-wc-payments-features.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,6 @@ public static function is_fraud_protection_welcome_tour_dismissed(): bool {
return '1' === get_option( 'wcpay_fraud_protection_welcome_tour_dismissed', '0' );
}

/**
* Checks whether the Payouts Rename Spotlight notice was dismissed.
*
* @return bool
*/
public static function is_payouts_rename_notice_dismissed(): bool {
return '1' === get_option( 'wcpay_payouts_rename_notice_dismissed', '0' );
}

/**
* Checks whether the Stripe Billing feature is enabled.
*
Expand Down
1 change: 0 additions & 1 deletion includes/class-wc-payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,6 @@ public static function add_wcpay_options_to_woocommerce_permissions_list( $permi
'woocommerce_remind_me_later_todo_tasks',
'woocommerce_deleted_todo_tasks',
'wcpay_fraud_protection_welcome_tour_dismissed',
'wcpay_payouts_rename_notice_dismissed',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: I was wondering if there is a way to clean up this option from the wp_options of the merchant website DB to keep it clean. Something using the delete_option

'wcpay_capability_request_dismissed_notices',
'wcpay_onboarding_eligibility_modal_dismissed',
'wcpay_next_deposit_notice_dismissed',
Expand Down
Loading