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

WordPress 6.7 Compatibility - Translations triggered too early #3604

Open
mattallan opened this issue Nov 14, 2024 · 0 comments
Open

WordPress 6.7 Compatibility - Translations triggered too early #3604

mattallan opened this issue Nov 14, 2024 · 0 comments

Comments

@mattallan
Copy link
Contributor

Describe the bug
After updating to WordPress 6.7 and swapping your language to a non-english language (i.e. Spanish) you will start seeing the following notices:
Image

I haven't yet sourced where which area of Stripe specifically is causing this, however, as of WP 6.7, we shouldn't translate anything any earlier than the init hook.

Considering that our main WC_Stripe plugin instance is instantiated on plugins_loaded which is well before the init hook (see hook reference/order) we'll need to go through all files/classes loaded within our WC_Stripe->init() and ensure any translated strings are ran after init.

To Reproduce

  1. Install WordPress 6.7
  2. Go to your Edit User Profile page and set your language to EspañolImage
  3. Save the settings and reload any admin page
  4. You should see the following notice calling out Stripe at the top of the page:Image
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

No branches or pull requests

1 participant