gocodebox / gocodebox/lifterlms
Render the TranslatePress [trp_language] shortcode when used in LifterLMS notifications.
- Dominant language
- PHP
- Stars
- 212
- Forks
- 140
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 19
Description
### Reproduction Steps
On WordPress 6.2, install LifterLMS 7.1.4 and TranslatePress 2.5.3. **Use the Twenty Twenty Three theme**.
When you edit the content of the **popup notifications** (_e.g._, in _`WordPress Dashboard > LifterLMS > Settings > Notifications > Notification Settings > Enrollment > Basic`_) it does not render the `[trp_language]` shortcode as you can see in [this screenshot](https://share.getcloudapp.com/WnumQEND). However, on both my test site and on the customer's staging site, it works correctly when the shortcode is used inside a page [as shown in this video](https://share.getcloudapp.com/nOuKqmeL). This suggests that there is a bug in LifterLMS that prevents pop up notifications from rendering the `[trp_language]` shortcode.
Note that when you use the Astra, Kadence, LifterLMS LaunchPad themes, it also does not render this shortcode in the `dashboard/notifications/` page, as you can see in [this screenshot](https://share.getcloudapp.com/E0uXwE22). But renders the shortcodes correctly when you use the **Twenty Twenty Three theme** [as you can see in this video](https://share.getcloudapp.com/kpuAXm7R). This suggests that there is no bug in LifterLMS from rendering the `[trp_language]` shortcode in `dashboard/notifications/`, and that the themes Astra, Kadence and LaunchPad have a bug that needs to be fixed. (Sky Pilot does not have this issue with `dashboard/notifications/`)
### Expected Behavior
It should render the shortcode. For example, when the user selects English as the language this `[trp_language language="en_US"]English content only.[/trp_language][trp_language language="de_DE"]German content only.[/trp_language]` should be rendered and the output should be `English content only.` Similarly, if the user selects German on the language switcher, the output should be `German content only.`
### Actual Behavior
On both my local site and on the customer's staging site, it works correctly when the shortcode is used inside a page. However, when the shortcode is used inside `WordPress Dashboard > LifterLMS > Settings > Notifications > Notification Settings > * > Basic` it does not work. For example, it would not work when you use the shortcode in `WordPress Dashboard > LifterLMS > Settings > Notifications > Notification Settings > Enrollment > Basic`.
### This issue has be recreated:
+ [x] Locally
+ [x] On a staging site
+ [ ] On a production website
+ [ ] With only LifterLMS and a default theme
Contributor guide
Research direction
Reproduce the issue from the LifterLMS notification settings, comparing the Basic notification with shortcode rendering on a page and in dashboard/notifications/. Test the listed WordPress, LifterLMS, TranslatePress, and theme combinations; done means the selected language displays only its matching shortcode content in popup notifications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, content
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100