@@ -6,6 +6,9 @@ import MailerLiteActions from './MailerLiteActions'
66import { mailerliteRefreshFields } from './MailerLiteCommonFunc'
77import { useState } from 'react'
88import Note from '../../Utilities/Note'
9+ import { useRecoilValue } from 'recoil'
10+ import { $btcbi } from '../../../GlobalStates'
11+ import { getProLabel } from '../../Utilities/ProUtilHelpers'
912
1013export default function MailerLiteIntegLayout ( {
1114 formFields,
@@ -16,8 +19,8 @@ export default function MailerLiteIntegLayout({
1619 setLoading,
1720 setSnackbar
1821} ) {
19- const [ error , setError ] = useState ( { name : '' , auth_token : '' } )
20- const [ isAuthorized , setisAuthorized ] = useState ( false )
22+ const btcbi = useRecoilValue ( $btcbi )
23+ const { isPro } = btcbi
2124
2225 return (
2326 < >
@@ -35,14 +38,18 @@ export default function MailerLiteIntegLayout({
3538 < option
3639 value = "delete_subscriber"
3740 data-action_name = "delete_subscriber"
38- disabled = { mailerLiteConf . mailer_lite_type === 'v1' } >
39- { __ ( 'Delete subscriber' , 'bit-integrations' ) }
41+ disabled = { mailerLiteConf . mailer_lite_type === 'v1' || ! isPro } >
42+ { isPro
43+ ? __ ( 'Delete subscriber' , 'bit-integrations' )
44+ : getProLabel ( __ ( 'Delete subscriber' , 'bit-integrations' ) ) }
4045 </ option >
4146 < option
4247 value = "forget_subscriber"
4348 data-action_name = "forget_subscriber"
44- disabled = { mailerLiteConf . mailer_lite_type === 'v1' } >
45- { __ ( 'Forget subscriber' , 'bit-integrations' ) }
49+ disabled = { mailerLiteConf . mailer_lite_type === 'v1' || ! isPro } >
50+ { isPro
51+ ? __ ( 'Forget subscriber' , 'bit-integrations' )
52+ : getProLabel ( __ ( 'Forget subscriber' , 'bit-integrations' ) ) }
4653 </ option >
4754 </ select >
4855
0 commit comments