diff --git a/projects/plugins/jetpack/extensions/blocks/donations/edit.js b/projects/plugins/jetpack/extensions/blocks/donations/edit.js index f19f29076c8f0..c4bd4b1c24598 100644 --- a/projects/plugins/jetpack/extensions/blocks/donations/edit.js +++ b/projects/plugins/jetpack/extensions/blocks/donations/edit.js @@ -22,7 +22,7 @@ const Edit = props => { const blockProps = useBlockProps(); const [ loadingError, setLoadingError ] = useState( '' ); const [ products, setProducts ] = useState( [] ); - const { hasConnectedOwner } = useConnection(); + const { isUserConnected } = useConnection(); const { lockPostSaving, unlockPostSaving } = useDispatch( 'core/editor' ); const post = useSelect( select => select( 'core/editor' ).getCurrentPost(), [] ); @@ -137,7 +137,7 @@ const Edit = props => { let content; - if ( ! hasConnectedOwner ) { + if ( ! isUserConnected ) { content = ( { const { getConnectUrl, isApiStateConnected } = select( membershipProductsStore ); return { @@ -76,7 +76,7 @@ function PaymentButtonsEdit( { clientId, attributes } ) { delete innerBlocksProps.id; delete innerBlocksProps[ 'data-block' ]; - if ( ! hasConnectedOwner ) { + if ( ! isUserConnected ) { return (
select( editorStore ).getCurrentPostType(), [] ); const accessLevel = useAccessLevel( postType ); - const { hasConnectedOwner } = useConnection(); + const { isUserConnected } = useConnection(); const { stripeConnectUrl, hasTierPlans } = useSelect( select => { const { getNewsletterTierProducts, getConnectUrl } = select( 'jetpack/membership-products' ); @@ -46,7 +46,7 @@ function PaywallEdit() { setAccess( value ); } - if ( ! hasConnectedOwner ) { + if ( ! isUserConnected ) { return (
setAttributes( { selectedPlanIds: productIds } ); @@ -102,7 +102,7 @@ function Edit( { clientId, isSelected, attributes, setAttributes } ) { const isSmallViewport = useViewportMatch( 'medium', '<' ); - if ( ! hasConnectedOwner ) { + if ( ! isUserConnected ) { return (