You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you did not use the companion function icl_register_string() (also deprecated since WPML 3.2 and replaced by the action wpml_register_single_stringhttps://wpml.org/wpml-hook/wpml_register_single_string/, you are relying on a WPML option allowing to auto-register strings. This has several issues:
As it's optional, you can't be sure that your strings will be registered
Auto-register writes to DB on frontend. Any user aware of this would deactivate this option to improve his site's performance.
Note: icl_t() works with Polylang except that we don't honor auto-register for the performance issues it causes.
I suggest to register the strings when they are saved in options. That way, you would not have to rely on the corresponding WPML option and the plugin would also work out of the box with Polylang.
The text was updated successfully, but these errors were encountered:
cristian-ungureanu
added
the
bug
This label could be used to identify issues that are caused by a defect in the product.
label
Mar 9, 2021
The current integration with WPML is done with calls to the function
icl_t()
here and in a few other lines of the same file.There are a few caveats with this way of proceeding.
icl_t()
is deprecated since WPML 3.2 and should be replaced by the filterwpml_register_single_string
. See: https://wpml.org/wpml-hook/wpml_translate_single_string/.icl_register_string()
(also deprecated since WPML 3.2 and replaced by the actionwpml_register_single_string
https://wpml.org/wpml-hook/wpml_register_single_string/, you are relying on a WPML option allowing to auto-register strings. This has several issues:Note:
icl_t()
works with Polylang except that we don't honor auto-register for the performance issues it causes.I suggest to register the strings when they are saved in options. That way, you would not have to rely on the corresponding WPML option and the plugin would also work out of the box with Polylang.
The text was updated successfully, but these errors were encountered: