Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export default function PlanNotice( props: PlanNoticeProps ) {
showDismiss
onDismissClick={ handleDismissNotice }
icon="info-outline"
status="is-success"
theme="light"
status="is-warning"
theme="dark"
>
{ translate(
'This plan was purchased by a different WordPress.com account. To manage this plan, log in to that account or contact the account owner.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ function getLoggedInPlansAction( {
const createLoggedInPlansAction = (
text: TranslateResult,
variant: GridAction[ 'primary' ][ 'variant' ] = 'primary',
ariaLabel?: TranslateResult
ariaLabel?: TranslateResult,
status?: GridAction[ 'primary' ][ 'status' ]
) => ( {
primary: {
callback: async () => {
Expand All @@ -428,7 +429,8 @@ function getLoggedInPlansAction( {
setIsLoading( false );
return;
},
status: ( isLoading ? 'blocked' : 'enabled' ) as GridAction[ 'primary' ][ 'status' ],
status:
status ?? ( ( isLoading ? 'blocked' : 'enabled' ) as GridAction[ 'primary' ][ 'status' ] ),
text,
ariaLabel,
variant,
Expand Down Expand Up @@ -565,5 +567,10 @@ function getLoggedInPlansAction( {
);
}

return createLoggedInPlansAction( translate( 'Upgrade', { context: 'verb' } ) );
return createLoggedInPlansAction(
translate( 'Upgrade', { context: 'verb' } ),
'primary',
undefined,
canUserManageCurrentPlan ? undefined : 'disabled'
);
}