Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues with translating WooCommerce products using WPML, where clicking 'Translate product' results in an error message 'Sorry, you are not allowed to access this page', and a fatal error when accessing the Status field, we have a solution for you.
Solution:
First, ensure you have a full backup of your website. Then, follow these steps:
* Step 1: Create a new temporary admin user and test if the issue persists with this new account. If the new admin can translate products without the error, the issue might be related to role/capabilities problems on the original account.
* Step 2: If the problem continues, temporarily reset WPML capabilities by adding the following code to your child theme's functions.php:

function wpmlsupp_reset_wpml_capabilities_custom() {<br />    if (function_exists('icl_enable_capabilities')) {<br />        icl_enable_capabilities();<br />    }<br />}<br />add_action('shutdown', 'wpmlsupp_reset_wpml_capabilities_custom');

Load any admin page once to trigger the function, then immediately remove the snippet. Clear any server/plugin caches, log out, and log in again. Test by navigating to WooCommerce → WooCommerce Multilingual & Multicurrency → Products and clicking 'Translate product'.
* Step 3: If the issue persists, check for compatibility conflicts by disabling all plugins except WooCommerce and WPML-related ones, and switch to a default WordPress theme like Twenty Twenty-five to see if the issue resolves.

If these steps do not resolve your issue, or if the solution seems outdated or irrelevant to your case, 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 needed, please open a new support ticket at WPML support forum for further assistance.

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.

Tagged: 

This topic contains 4 replies, has 0 voices.

Last updated by Otto 4 months, 1 week ago.

Assisted by: Otto.

Author Posts
December 3, 2025 at 6:57 pm #17632065

jozsefM

Hi, when I can translate woocommerce product with WCML after clicking to Translate product, WP give this error messages: Sorry, you are not allowed to access this page. When I click on Status field It give an error message too:
Fatal error: Uncaught Error: Undefined constant "WPML_TM_FOLDER" in /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/template-classes/status/class-wcml-status-config-warnings-ui.php:59 Stack trace: #0 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/template-classes/class-wcml-templates-factory.php(25): WCML_Status_Config_Warnings_UI->get_model() #1 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/template-classes/status/class-wcml-status-ui.php(47): WCML_Templates_Factory->get_view() #2 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/template-classes/class-wcml-templates-factory.php(25): WCML_Status_UI->get_model() #3 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/template-classes/class-wcml-menus-wrap.php(113): WCML_Templates_Factory->get_view() #4 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/template-classes/class-wcml-menus-wrap.php(74): WCML_Menus_Wrap->get_current_menu_content('status') #5 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/template-classes/class-wcml-menus-wrap-base.php(24): WCML_Menus_Wrap->get_child_model() #6 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/template-classes/class-wcml-templates-factory.php(25): WCML_Menu_Wrap_Base->get_model() #7 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/sitepress-multilingual-cms/classes/templating/class-wpml-templates-factory.php(84): WCML_Templates_Factory->get_view(NULL, NULL) #8 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/admin-menus/class-wcml-admin-menus.php(147): WPML_Templates_Factory->show() #9 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-includes/class-wp-hook.php(341): WCML_Admin_Menus::render_menus('') #10 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters('', Array) #11 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #12 /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-admin/admin.php(264): do_action('woocommerce_pag...') #13 {main} thrown in /data/e/b/eb583c90-a9d7-4da2-a2c7-3819fab6795a/grun-power.sk/web/wp-content/plugins/woocommerce-multilingual/inc/template-classes/status/class-wcml-status-config-warnings-ui.php on line 59
I have reinstall the latest plugins with no resolving. Please help me resolve this issue.

December 3, 2025 at 7:38 pm #17632141

Otto

Hello,

Please, try the following:

❌ Please make a full website backup before proceeding ❌

* Step 1

* Create a new temporary admin user, and test with this new user if the issue persists. .
* If the new admin can translate products without the error, the issue is role/caps problem on the original account.

If the issue persists with the new user:
* Step 2 – Temporarily reset WPML capabilities

* Add this snippet to their child theme’s functions.php:

    function wpmlsupp_reset_wpml_capabilities_custom() {
        if ( function_exists( 'icl_enable_capabilities' ) ) {
            icl_enable_capabilities();
        }
    }
    add_action( 'shutdown', 'wpmlsupp_reset_wpml_capabilities_custom' );
    

* Then load **any** admin page once (for example, Dashboard).
* The function runs on `shutdown` and re-adds all WPML capabilities to the proper roles.
* Immediately remove the snippet (so it doesn’t run on every request).
* Clear any server/plugin caches.
* Log out and log in again as the admin.
* Test again by going to **WooCommerce → WooCommerce Multilingual & Multicurrency → Products** and clicking **Translate product**.
* If the error is gone, the cause was corrupted/missing WPML/WCML capabilities for that user/role.

If the issue still persists:
* Step 3: Check for compatibility conflicts
I suggest you try this to help us identify if it might be a conflict with another plugin or theme that is causing the problem.
**IMPORTANT:** Please try this in a staging environment or at least with a backup of your site files and database before continuing.
Disable all plugins except WooCommerce and WPML-related and temporarily change the theme to a default WordPress such as Twenty Twenty-five.
Is the issue resolved with these settings? If so, please reactivate one by one to see which conflicts.

Let me know your results, please.

Best Regards,
Otto

December 4, 2025 at 11:52 am #17633903
jozsefM

The issue is still on our site, I have disable plugins, change the theme, disable cluodflare, etc. i dont have access to translate products on our site. What can we do now please?

New threads created by Otto and linked to this one are listed below:

https://wpml.org/forums/topic/help-with-acf-translation/

December 4, 2025 at 2:21 pm #17634794

Otto

Hello,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue.
It would be better to a testing site where the issue is replicated.

The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I'll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site.
This will allow me to create a copy of your site and your content.
Once the problem is resolved I will delete the local site.

**IMPORTANT**
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields.

Best Regards,
Otto

December 5, 2025 at 12:25 pm #17638435

Otto

Hello,

Thanks.

I created a new ticket for the new issue. In our experience is better to tackle one problem per ticket 🙂

I'll follow up here:
https://wpml.org/forums/topic/help-with-acf-translation/

Best Regards,
Otto