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.
This topic is split from https://wpml.org/forums/topic/fatal-issues-with-string-translation/
Tagged: Compatibility
This topic contains 3 replies, has 0 voices.
Last updated by Sumit Singh 2 weeks ago.
Assisted by: Sumit Singh.
| Author | Posts |
|---|---|
| February 18, 2026 at 3:59 pm #17833225 | |
|
peterJ-48 |
Hi Sumit Best regards |
| February 20, 2026 at 11:37 am #17838030 | |
|
Sumit Singh WPML Supporter since 12/2025
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi Peter, I checked the Action Scheduler issue in detail. Each action uses a unique string, but if the same action is registered again, it will be displayed twice in the list. So, if a plugin or theme is registering the action without first checking whether it already exists, it will appear multiple times. If you believe the multiple actions are created because of multiple languages, I don’t think that is the case. The action name itself is not translated anywhere, so it should remain the same across all languages. I believe the plugin or theme author would be in a better position to explain why the same action is being registered multiple times. Ref: hidden link About the “action created” string being translated<br> I can even reproduce this behavior without WPML: 1. I disabled WPML. This is exactly what is happening on your site. Multiple users or front-end calls in different languages cause the “action created” string to be saved in the current language. Once stored in the database, it is reused and displayed, regardless of the user language. At this point, I’m not sure what we can do from the WPML side to prevent this. If WooCommerce stops localizing this string before saving it, the text would always remain in English. This appears to be mainly an Action Scheduler logic issue. If you would like, I can report this behavior to the Action Scheduler plugin maintainers. Thanks |
| February 23, 2026 at 4:06 pm #17843819 | |
|
peterJ-48 |
Keep ticket open |
| March 17, 2026 at 3:21 pm #17905242 | |
|
Sumit Singh WPML Supporter since 12/2025
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi Peter, To prevent the translation of strings from WC Action Scheduler, we can use this code. This code checks the string only for the WooCommerce domain and returns them without translation. We are only preventing selected strings that I have got from the code and are being used in the Action Scheduler code, not anywhere else. In the last email, I asked to translate the strings in string translation, but that approach is a bit complex and can break if someone changes the translation. Steps
/**
* WC Action Scheduler stores translated strings in the database
* and later displays them regardless of the current user language.
* This tweak prevents translation so English strings are shown in the backend.
*
* @author WPML Support
* @link wpmlvip-164
*/
add_filter('gettext_woocommerce', function( $translation, $text ) {
$strings = [
'action created',
'action canceled',
'action started via %s',
'action started',
'action complete via %s',
'action complete',
'action failed via %1$s: %2$s',
'action failed: %s',
'action marked as failed after %s seconds. Unknown error occurred. Check server, PHP and database error logs to diagnose cause.',
'unexpected shutdown: PHP Fatal error %1$s in %2$s on line %3$s',
'action reset',
'action ignored via %s',
'action ignored',
'There was a failure fetching this action: %s',
'There was a failure fetching this action',
'There was a failure scheduling the next instance of this action: %s',
];
if ( in_array( $text, $strings ) ) {
return $text;
}
return $translation;
}, PHP_INT_MAX, 2 );
Next time the logs will use English string instead of translated strings. Thanks |

