I just finished updating a site from 4.48.0 to 5.0.2, GScan notifiying me that I had to switch a couple of instances of {{products}}
to {{tiers}}
. Easy enough, and the instance was backed up and upgraded without a hitch.
However, there’s a bunch of other similar handlebars usage which GScan apparently didn’t pick up and which results in the tiers/membership page not fully rendering. I checked out the docs but I wasn’t clear about what I should be doing to update things. Anybody know how I should be updating the following? I tried straight-up replacing product
with tier
and products
with tiers
, but that didn’t quite do the trick.
<div class='c-member-plans'>
{{#foreach @products as |product|}}
<div class='c-member-plan'>
<div class="member-plan__alignment">
<div>
<header class='c-member-plan__header'>
<h3 class='c-member-plan__title'>{{product.name}}</h3>
<div class='c-member-plan__description'>{{product.description}}</div>
<span class='c-member-plan__sign'>{{ price currency=@price.currency }}</span>
{{#if product.monthly_price}}
<span class='monthly-plan'><strong class='c-member-plan__amount'>{{price monthly_price.amount}}</strong> / {{t 'month'}}</span>
{{/if}}
{{#if product.yearly_price}}
<span class='annual-plan'><strong class='c-member-plan__amount'>{{price yearly_price.amount}}</strong> / {{t 'year'}}</span>
{{/if}}
{{^if product.monthly_price}}
{{^if product.yearly_price}}
<span><strong class='c-member-plan__amount'>0</strong></span>
{{/if}}
{{/if}}
</header>
<div class='c-member-plan__content'>
{{#if benefits}}
<ul class='c-member-plan__list'>
{{#foreach benefits as |benefit|}}
<li>{{benefit.name}}</li>
{{/foreach}}
</ul>
{{/if}}
</div>
</div>
{{#if product.monthly_price}}
<span class="monthly-plan">
<a class='c-btn c-btn--action c-btn--small' data-members-plan="{{product.monthly_price.id}}">Join {{ price currency=@price.currency }}{{price monthly_price.amount}} / month tier</a>
</span>
{{/if}}
{{#if product.yearly_price}}
<span class="annual-plan">
<a class='c-btn c-btn--action c-btn--small' data-members-plan="{{product.yearly_price.id}}">Join {{ price currency=@price.currency }}{{price yearly_price.amount}} / year tier</a>
</span>
{{/if}}
{{^if product.monthly_price}}
{{^if product.yearly_price}}
<form data-members-form='subscribe' class='signup-box c-subscribe-form'>
<div>
<div class='u-alert u-alert--success u-mt-8'>{{t 'Please check your inbox and click the link to confirm your subscription.' }}</div>
<div class='u-alert u-alert--invalid u-mt-8'>{{t 'Please enter a valid email address!' }}</div>
<div class='u-alert u-alert--error u-mt-8'>{{t 'An error occurred, please try again later.' }}</div>
<label for='signin-form-email' class='u-hidden-visually'>{{t 'Your email' }}</label>
<input type='email' class='c-subscribe-form__input' id='signup-form-email' placeholder='Your email' required data-members-email>
</div>
<div>
<button type='submit' class='c-btn c-btn--action c-btn--small c-subscribe-form__btn'>Subscribe</button>
</div>
</form>
{{/if}}
{{/if}}
</div>
</div>
{{/foreach}}
</div>