Skip to content

Update deprecated @price helpers to modern price helper syntax#180

Closed
vitrixbot wants to merge 1 commit intoTryGhost:mainfrom
vitrixbot:fix-price-helpers
Closed

Update deprecated @price helpers to modern price helper syntax#180
vitrixbot wants to merge 1 commit intoTryGhost:mainfrom
vitrixbot:fix-price-helpers

Conversation

@vitrixbot
Copy link
Contributor

The global @price object is deprecated. This updates members/signup.hbs to use the modern {{price}} helper:

  • {{price currency=@price.currency}}{{@price.monthly}}{{price monthly_price currency=currency}}
  • {{price currency=@price.currency}}{{@price.yearly}}{{price yearly_price currency=currency}}

The {{price}} helper handles currency symbol formatting automatically.

Supersedes #160 (which had a duplicate currency symbol bug).

Replace deprecated {{@price.monthly}} and {{@price.yearly}} with
{{price monthly_price currency=currency}} and {{price yearly_price currency=currency}}
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Walkthrough

The change modifies the members/signup.hbs template to refactor how prices are rendered. Instead of accessing price currency and monthly/yearly amounts through separate template interpolations ({{@price.currency}} with {{@price.monthly}}/{{@price.yearly}}), the template now uses a consolidated price object lookup pattern. Monthly prices are rendered with {{price monthly_price currency=currency}} and yearly prices with {{price yearly_price currency=currency}}. This aggregates the price and currency data retrieval into single helper calls while maintaining the same visual output and template structure.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating deprecated @price helpers to modern price helper syntax in members/signup.hbs.
Description check ✅ Passed The description is directly related to the changeset, providing specific examples of the deprecated syntax being replaced with modern helpers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@JohnONolan JohnONolan closed this Feb 11, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
members/signup.hbs (1)

17-55: ⚠️ Potential issue | 🔴 Critical

monthly_price, yearly_price, and currency are undefined—prices will not render.

Lines 21 and 39 use {{price monthly_price currency=currency}}, but these variables do not exist in this template scope. They are never defined, passed, or available in the {{else if @member}} context.

The old syntax ({{@price.monthly}}, {{@price.yearly}}, {{@price.currency}}) relied on Ghost's legacy @price global, which was available at any scope. The new syntax requires these values to be in scope, either as template variables or from a tier/plan object context.

To fix: either restore the working @price globals (if still supported in your Ghost version), or wrap the checkout content in a {{#get "tiers"}} block to access monthly_price and yearly_price from tier objects. See members/account.hbs line 36-41 for the correct pattern of iterating tiers with {{#foreach @member.subscriptions}} and accessing {{price plan}}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments