This thread is resolved. Here is a description of the problem and solution.
Problem: You are experiencing an issue where after updating WPML, a custom plugin that sets a new order status shows the English fallback name instead of the translated string on the orders admin page. Solution: We recommend modifying your plugin code to use the existing "woocommerce" text domain instead of re-registering the string under its own custom plugin text domain. Here is an example of how you can adjust your code:
Please note that custom code is outside the scope of our support. If this solution does not resolve your issue or if it becomes outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
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.
After some thorough investigation, I found a few things:
1. First and foremost, for the statuses to show properly in the future, it's necessary to activate the option "Ορισμός γλώσσας διαχείρισης ως γλώσσας επεξεργασίας" under Users > Profile;
2. The issue only occurs when both the Astra Theme and the Order Tracker for WooCommerce plugin are active. Deactivating any of the 2 solves the issue;
3. The forementioned plugin is out of date, and needs a newer PHP version to be updated;
I suspect that there's some conflict or behavior overwriting WPML translations. To continue, please follow these steps in the staging website:
1. Make sure that "Ορισμός γλώσσας διαχείρισης ως γλώσσας επεξεργασίας" is checked for your user profile;
2. Update your PHP version to 8.3. You can ask your hosting to do that;
3. Update the Order Tracker for WooCommerce plugin;
After that, check if the statuses show properly. Let me know the results. If they still show in the wrong language, I'll check further. Please don't activate any plugins, as it's easier to debug with unrelated plugins inactive. Thanks in advance for your patience and cooperation.
Thank you for sharing the details. Can you please restore the staging version with the original? I'll need to escalate it internally, and need a fresh copy of production to do so.
In addition I would like you to ask to reverse any changes that might have been done by you or your colleague Lucas to the live site because they create some problems.
We notice that in every page we go the status Shipped is displayed at the top of the page before anything else is loaded that also affect the requests made in plugin updates.
Thank you for your patience. I've got feedback from he 2nd tier team:
"The simplest solution is to just modify their code so that instead of re-registering the string "Shipped" under its own custom plugin text domain, to modify the plugin code so that it uses the existing "woocommerce" text domain that already has the string available."
They've already applied that on the website, and confirmed that it's now working as expected.
/**
* Add new order status
*/
function tw_acs_register_new_order_statuses() {
register_post_status( 'wc-shipped', array(
'label' => __( 'Shipped', 'woocommerce' ),
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'label_count' => _n_noop(
'Shipped <span class="count">(%s)</span>',
'Shipped <span class="count">(%s)</span>',
'acs-courier-voucher'
),
) );
}
/**
* Register in wc_order_statuses.
*/
function tw_acs_new_wc_order_statuses( $order_statuses ) {
$new_statuses_arr = array();
// add new order status after processing
foreach ( $order_statuses as $id => $label ) {
$new_statuses_arr[ $id ] = $label;
if ( 'wc-completed' === $id ) { // after "Completed" status
$new_statuses_arr['wc-shipped'] = __( 'Shipped', 'woocommerce' );
}
}
return $new_statuses_arr;
}
Please note that custom code is outside the scope of our support, so we already went the extra mile to assist you with that matter. We can no longer continue supporting this issue, and expect that the provided solution is enough.