This thread is resolved. Here is a description of the problem and solution.
Problem:
The client reported that editors and shop managers were unable to translate pages or products that were completed by an admin.
Solution:
First, we provided a workaround:
1) Navigate to the
*sitepress-multilingual-cms/vendor/wpml/wp/classes*
folder.
2) Edit the
*User.php*
file.
3) Locate line 217 and replace the existing code with:
public static function isEditor(\WP_User $user = null) { $capability = "editor"; $capability = apply_filters('wpml_editor_capability', $capability ); return self::hasCap( $capability, $user ); }
4) Edit the
functions.php
file of your theme and add the following code at the bottom:
add_filter('wpml_editor_capability', 'my_editor'); function my_editor(){ $user = wp_get_current_user(); if (in_array('shop_manager', (array)$user->roles, true)){ return 'shop_manager'; } }
5) Clear all types of caches.
We emphasized the importance of taking a full site backup before applying this workaround.
Subsequently, we released a new version of WPML (4.6.9 series) that included a fix for this issue. We advised the client to update to the latest version after ensuring a full site backup and check if the problem persists.
If this solution doesn't look relevant to your situation, please open a new support ticket with us.
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 contains 10 replies, has 2 voices.
Last updated by 1 year, 8 months ago.
Assisted by: Bigul.