diff --git a/assets/wizards/engagement/components/types.ts b/assets/wizards/engagement/components/types.ts index f21b01cbe7..6b908dab36 100644 --- a/assets/wizards/engagement/components/types.ts +++ b/assets/wizards/engagement/components/types.ts @@ -42,6 +42,9 @@ declare global { preview_post: string; preview_archive: string; }; + newspack_reader_revenue: { + can_use_name_your_price: boolean; + }; } } diff --git a/assets/wizards/readerRevenue/views/donation/index.tsx b/assets/wizards/readerRevenue/views/donation/index.tsx index 24173bcd25..c0b64fee31 100644 --- a/assets/wizards/readerRevenue/views/donation/index.tsx +++ b/assets/wizards/readerRevenue/views/donation/index.tsx @@ -1,5 +1,3 @@ -/* globals newspack_reader_revenue */ - /** * WordPress dependencies. */ @@ -106,7 +104,7 @@ export const DonationAmounts = () => { const minimumDonationFloat = parseFloat( minimumDonation ); // Whether we can use the Name Your Price extension. If not, layout is forced to Tiered. - const canUseNameYourPrice = newspack_reader_revenue?.can_use_name_your_price; + const canUseNameYourPrice = window.newspack_reader_revenue?.can_use_name_your_price; return ( <>