[solved] Updating Lyra theme adjusting price helper to work with Ghost 5

Trying for a day to adjust the Lyra theme to work with Ghost 5.

I’m consistently getting the error ERROR Attribute is required e.g. {{price plan.amount}}

Would anyone be so kind to share any pointers should you have been able to sort this?

Logs below

2022-11-25T14:56:18.309 app[845859ba] sea [info] [2022-11-25 14:56:18] INFO "GET /cart.json/" 404 133ms

2022-11-25T14:56:20.515 app[845859ba] sea [info] [2022-11-25 14:56:20] ERROR Attribute is required e.g. {{price plan.amount}}

2022-11-25T14:56:20.515 app[845859ba] sea [info]

2022-11-25T14:56:20.515 app[845859ba] sea [info] Attribute is required e.g. {{price plan.amount}}

2022-11-25T14:56:20.515 app[845859ba] sea [info] Error ID:

2022-11-25T14:56:20.515 app[845859ba] sea [info] 526c3020-6cd1-11ed-83dc-5b56bd8a2d9a

2022-11-25T14:56:20.515 app[845859ba] sea [info] ----------------------------------------

2022-11-25T14:56:20.515 app[845859ba] sea [info] IncorrectUsageError: Attribute is required e.g. {{price plan.amount}}

2022-11-25T14:56:20.515 app[845859ba] sea [info] at Object.price (/var/lib/ghost/versions/5.23.0/core/frontend/helpers/price.js:85:15)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at Object.wrapper (/var/lib/ghost/versions/5.23.0/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js:15:19)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at eval (eval at createFunctionContext (/var/lib/ghost/versions/5.23.0/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), <anonymous>:10:103)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at prog (/var/lib/ghost/versions/5.23.0/node_modules/handlebars/dist/cjs/handlebars/runtime.js:268:12)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at execIteration (/var/lib/ghost/versions/5.23.0/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:51:19)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at Object.each (/var/lib/ghost/versions/5.23.0/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:61:13)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at Object.<anonymous> (/var/lib/ghost/versions/5.23.0/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js:22:33)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at Object.wrapper (/var/lib/ghost/versions/5.23.0/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js:15:19)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at eval (eval at createFunctionContext (/var/lib/ghost/versions/5.23.0/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), <anonymous>:5:56)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at Object.prog [as fn] (/var/lib/ghost/versions/5.23.0/node_modules/handlebars/dist/cjs/handlebars/runtime.js:268:12)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at Object.get (/var/lib/ghost/versions/5.23.0/core/frontend/helpers/get.js:179:24)

2022-11-25T14:56:20.515 app[845859ba] sea [info] at async Object.returnAsync (/var/lib/ghost/versions/5.23.0/core/frontend/services/helpers/handlebars.js:16:30)

2022-11-25T14:56:20.515 app[845859ba] sea [info]

Code is:

<a class="make-plan-clickable" href="javascript:" data-members-plan="Monthly">
  <div class="checkout-plan">
    <header class="checkout-plan-header">
      <h3>Monthly <span class="beta">(beta)</span>
      </h3> Get access to everything and lock in early adopter pricing for life &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <p class="prices">
        <strong>{{#get "tiers"}}{{price currency=currency}}{{price monthly_price currency=currency}}{{/get}}</strong> / month &nbsp&nbsp&nbsp&nbsp
      </p>
    </header>
    <div class="checkout-plan-content">
      <a class="button primary fit" href="javascript:" data-members-plan="Monthly">Choose this plan</a>
    </div>
  </div>
  </div>
</a>

For others in future:
This snippet should make it work work:

<a class="make-plan-clickable" href="javascript:" data-members-plan="Monthly">
  <div class="checkout-plan">
    <header class="checkout-plan-header">
      <h3>Monthly <span class="beta">(beta)</span>
      </h3> Get access to everything and lock in early adopter pricing for life &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <p class="prices">
        <strong>{{#get "tiers" as |tier|}}  {{#foreach tiers}}{{#if monthly_price}}{{price monthly_price currency=currency}}{{/if}}{{/foreach}}{{/get}}}</strong> / month &nbsp&nbsp&nbsp&nbsp
      </p>
    </header>
    <div class="checkout-plan-content">
      <a class="button primary fit" href="javascript:" data-members-plan="Monthly">Choose this plan</a>
    </div>
  </div>
  </div>
</a>