diff --git a/src/blocks/donate/frequency-based/index.ts b/src/blocks/donate/frequency-based/index.ts index 2ebb40cbd..dbed4edd7 100644 --- a/src/blocks/donate/frequency-based/index.ts +++ b/src/blocks/donate/frequency-based/index.ts @@ -30,6 +30,7 @@ const resetOtherValue = ( container: HTMLElement ) => { if ( ! frequencies?.length ) { return; } + const frequencyInputs = container.querySelectorAll( 'input[name="donation_frequency"]' ); frequencies.forEach( frequency => { const tiers = frequency.querySelectorAll( 'input[type="radio"]' ); const input = frequency.querySelector( '.money-input input' ); @@ -43,6 +44,9 @@ const resetOtherValue = ( container: HTMLElement ) => { tiers.forEach( tierInput => { tierInput.addEventListener( 'change', reset ); } ); + frequencyInputs.forEach( frequencyInput => { + frequencyInput.addEventListener( 'change', reset ); + } ); } ); };