This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is using the 'WooCommerce Product Tabs' plugin and is unable to find the new string for product tab titles in WPML > String Translation. Additionally, many 'WooCommerce Product Tabs' strings are marked as 'pending with the hourglass' and are not appearing elsewhere.
Solution:
We recommend following these steps to resolve the issue:
1- Go to Products -> Product Tabs and access the trash (or click the link to your trash directory).
2- Delete the French product tabs.
3- Open the file .../wp-content/plugins/woocommerce-product-tabs/src/Product_Tabs.php.
4- Locate line 60 and replace the code:
$wpt_tabs[ $key ]['title'] = esc_attr( $prd->post_title );
with:
$wpt_tabs[ $key ]['title'] = esc_attr( $prd->post_title ); // WPML Workaround for compsupp-7241 if ( class_exists('Sitepress') ) { $string = $wpt_tabs[ $key ]['title']; $textdomain = 'WordPress'; $string_name = 'WPML Workaround : '.substr($string, 0, 20); $wpml_default_lang = apply_filters('wpml_default_language', NULL ); $wpml_current_lang = apply_filters( 'wpml_current_language', NULL ); if ($wpml_default_lang == $wpml_current_lang ) { do_action( 'wpml_register_single_string', $textdomain, $string_name, $string ); } // Apply the translation to the string $string = apply_filters('wpml_translate_single_string', $string , $textdomain, $string_name); $wpt_tabs[ $key ]['title'] = $string; // Replace the title }
5- Go to WPML > String Translation, enable the option 'look for strings while pages are rendered' at the bottom of the page, and visit a product with the tabs so WPML includes the new strings.
6- Go to WPML > String Translation, search for the tabs titles, and translate them.
If this solution does not resolve your issue or seems 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 the problem persists, please open a new support ticket.
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.
Our next available supporter will start replying to tickets in about 5.84 hours from now. Thank you for your understanding.
This topic contains 3 replies, has 2 voices.
Last updated by Mateus Getulio 3 months, 1 week ago.
Assisted by: Mateus Getulio.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.