Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 4 replies, has 1 voice.

Last updated by Andreas W. 2 days, 4 hours ago.

Assisted by: Andreas W..

Author Posts
April 30, 2026 at 12:01 pm #18005511

dr-ossamaE

Hi, I’m facing these issues with WPML.

Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woo-discount-rules domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. (This message was added in version 6.7.0.)
_load_textdomain_just_in_time()
Plugin: woo-discount-rules
Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woo-discount-rules-pro domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. (This message was added in version 6.7.0.)
_load_textdomain_just_in_time()
Plugin: woo-discount-rules-pro
Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woodmart domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. (This message was added in version 6.7.0.)
_load_textdomain_just_in_time()
Parent Theme

warning
Undefined array key "language_code"
wp-content/plugins/ti-woocommerce-wishlist/public/tinvwl.class.php:305
2 Plugin: ti-woocommerce-wishlist
warning
Undefined array key "language_code"
wp-content/plugins/ti-woocommerce-wishlist/public/tinvwl.class.php:306
2 Plugin: ti-woocommerce-wishlist

Please advise.

Kind regards,
Dr. Ossama El Baklawy
Partner & Executive Manager
Blueberry Inc.

May 2, 2026 at 2:48 pm #18008699

dr-ossamaE

Hello WPML Support,

I am running a high-traffic WooCommerce pharmacy on a Cloudways Scale Plan. We are seeing persistent PHP Warnings in our logs that appear to be related to how WPML interacts with TI Wishlist and our Theme's translation loading.

Undefined Array Key: We are getting Undefined array key "language_code" in plugins/ti-woocommerce-wishlist/public/tinvwl.class.php. This happens when the wishlist tries to pull the current language from the WPML session.

Translation Loading (init action): We are seeing _load_textdomain_just_in_time errors for woo-discount-rules and woodmart. It seems the translation domain is being triggered before the 'init' action.

Could you please check if there is a specific configuration in WPML > Languages or WPML > String Translation that ensures the language_code is globally available to third-party plugins earlier in the loading sequence?

I have already fixed our REST API timeouts, so the server communication is fast (200ms). I just need these coding conflicts resolved to clean up our PHP logs.

May 2, 2026 at 11:58 pm #18008994

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for reaching out!

1) The _load_textdomain_just_in_time error is a known issue and is not related to WPML. In this case, the issue occurs inside the plugin Discount Rules for WooCommerce.

For a while, WordPress changed the way in which plugins load their text domains, and this plugin is not yet following the latest WordPress standards. This issue will not break your site, but it should be reported to the respective support team.

2) The second error, which refers to TI WooCommerce Wishlist might be a compatilbity issue with WPML, which means it might be that the plugin is not using the proper code to work together with WPML.

I have tried to recreate such an error on a test site with WooCommerce, TI Wishlist, and WPML, but can not confirm any issue so far on the Frontend.

Did you make sure to enable the option WPML > Languages > Make themes work multilingual > Adjust IDs for multilingual functionality?

What I can confirm is that you will run into an issue on the WP-admin if you try to edit the Wishlist page while a product is added to the wishlist.

Best regards
Andreas

May 9, 2026 at 7:21 pm #18024596

dr-ossamaE

I did what you said but I still have these errors. Message
Caller

All
Component

All
Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woo-discount-rules domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. (This message was added in version 6.7.0.)
_load_textdomain_just_in_time()
Plugin: woo-discount-rules
Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woo-discount-rules-pro domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. (This message was added in version 6.7.0.)
_load_textdomain_just_in_time()
Plugin: woo-discount-rules-pro
Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woodmart domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. (This message was added in version 6.7.0.)
_load_textdomain_just_in_time()
Parent Theme Query Count Time Callers Components Potential Troublemakers
SELECT a.*, g.slug AS group
FROM wp_actionscheduler_actions a
LEFT JOIN wp_actionscheduler_groups g
ON a.group_id=g.group_id
WHERE a.action_id=7907 2 0.0007 ActionScheduler_DBStore->fetch_action()
2 calls
Plugin: seo-by-rank-math
2 calls
ActionScheduler_HybridStore->get_store_from_action_id()
1 call
ActionScheduler_DBStore->fetch_action()
1 call
SELECT p.ID
FROM wp_posts p
JOIN wp_icl_translations wpml_translations
ON p.ID = wpml_translations.element_id
WHERE wpml_translations.element_type='post_page'
AND p.post_type='page'
AND wpml_translations.language_code = 'en' 2 0.0006 WPML_Remove_Pages_Not_In_Current_Language->get_post_ids()
2 calls
Plugin: sitepress-multilingual-cms
2 calls
WPML_Remove_Pages_Not_In_Current_Language->get_post_ids()
2 calls
SELECT default_locale
FROM wp_icl_languages
WHERE code = 'en'
LIMIT 1 2 0.0005 SitePress->get_locale_from_language_code()
2 calls
Plugin: sitepress-multilingual-cms
2 calls
SitePress->wp_upgrade_locale()
1 call
WPML_Upgrade_Admin_Users_Languages->run()
1 call
SELECT autoload
FROM wp_options
WHERE option_name = 'wbte_sc_plugin_update_available_since' 2 0.0007 delete_option()
2 calls
Plugin: wt-smart-coupons-for-woocommerce
2 calls
wcmlim_hide_specific_stock_notice()
1 call
do_action('admin_notices')
1 call
SELECT term_taxonomy_id
FROM wp_term_taxonomy
WHERE term_id=447
AND taxonomy='nav_menu' 2 0.0004 WPML_Nav_Menu->_set_custom_status_in_theme_location_switcher()
2 calls
Plugin: sitepress-multilingual-cms
2 calls

May 9, 2026 at 9:05 pm #18024681

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Thank you for the detailed follow‑up and for sharing the log output.

_load_textdomain_just_in_time warnings
These notices are not caused by WPML itself. They originate from the way certain plugins (e.g. Discount Rules for WooCommerce, Woodmart theme) are loading their translation domains too early in the WordPress lifecycle. WordPress 6.7 introduced stricter checks, and any plugin that calls load_textdomain() before the init hook will trigger this warning.
→ Recommendation: Please report these issues directly to the respective plugin/theme authors so they can adjust their code. The warnings do not break functionality, but only the plugin developers can resolve them.

Undefined array key language_code in TI WooCommerce Wishlist
This warning indicates that the wishlist plugin is trying to read WPML’s current language before it is set. WPML provides the language context after initialization, so if a plugin queries it too early, the array key will be missing.

→ Recommendation: Ensure that in WPML → Languages → Make themes work multilingual → Adjust IDs for multilingual functionality, the option is enabled. If the warning persists, it points to a compatibility gap in TI Wishlist. Please confirm.

If this error is still occurring on the site when opening a Wishlist in a second language:
→ If so, further steps: I can offer to take a look at the site and investigate the cause of this error. I would need to investigate the cause first on a copy of your site and then try to recreate the issue. Could you provide admin access?

General performance queries
The database queries you listed (Action Scheduler, WPML translations, Rank Math SEO, Smart Coupons) are expected behavior of these plugins. They are not errors, but if performance is a concern, enabling object caching (Redis/Memcached) and reviewing scheduled actions can help reduce overhead.

→ Unless these queries lead to a very long load time, they are expected and will not need to be investigated.