Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next payment date localization efforts #3195

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

andrewlimaza
Copy link
Contributor

@andrewlimaza andrewlimaza commented Nov 12, 2024

  • ENHANCEMENT: Adjusted the format_subscription_date to be translatable and reworked the logic to support this.

Needs more thorough testing to ensure it's working as is.

Q: Should we ucfirst the returned string in cases like this when the date format is F j,Y, this won't affect any date formats that start with numbers etc.

Example of a fix.
Screenshot 2024-11-12 at 11 10 26

Steps I took to test that it still does what it says:

  1. Checkout for a recurring membership level so we have the "Next Payment Date" on the site.
  2. You can now test it in a non-English language to ensure translations are working correctly.
  3. To ensure local time is returned and not an incorrect time, I set my site time to something like UTC - 7 (GMT and UTC are in the same timezone).
  4. Set the format to a custom one like Y-m-d H:i:s (so we can see the actual time).
  5. View your membership account page it should show the "Next Payment Date" in local time correctly ( UTC - 7)
  6. To test GMT return times, comment out the conditional for "local_time" so it does not return here.
  7. Refresh the account page and notice that the dates are different.

@andrewlimaza andrewlimaza changed the title Next payment date i18n Next payment date localization efforts Nov 25, 2024
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.

1 participant