Open Mte90 opened 5 years ago
Currently using raw get()
methods from order meta data:
https://github.com/gocodebox/lifterlms/blob/master/templates/myaccount/view-order.php#L72 https://github.com/gocodebox/lifterlms/blob/master/templates/myaccount/view-order.php#L110 https://github.com/gocodebox/lifterlms/blob/master/templates/myaccount/view-order.php#L112
These functions should be using a method similar to whats found on the LLMS_Access_Plan
model:
get_access_period_name()
: https://github.com/gocodebox/lifterlms/blob/master/includes/models/model.llms.access.plan.php#L93
get_schedule_details()
: https://github.com/gocodebox/lifterlms/blob/master/includes/models/model.llms.access.plan.php#L372
get_trial_details()
: https://github.com/gocodebox/lifterlms/blob/master/includes/models/model.llms.access.plan.php#L407
These functions can likely be abstracted into classless functions which can be used by the existing plan methods and also by this template as well as pricing table templates and so on.
I was expecting that they was localized, maybe use __()
also for this strings and fix easily?
@Mte90 yep, it's a bug, I neglected to use l10n functions. We'll refactor to use them. It's unfortunately a bit more difficult since the terms are variable (year, month, day, week) and you can't just drop a database call variable into __()
and expect it to work right. Then you also need to consider plurals.
We'll fix it for sure but sorry it's not a simple one liner.
HS-122081
1. Reproduction Steps
year
andday
string are not localized2. Expected Behavior
3. Actual Behavior