You are not allowed to access this page
Find out how to fix the 'You are not allowed to access this page' WordPress error when enabling plugins
Ramesh avatar
Written by Ramesh
Updated over a week ago

You might have come across this very common error while building your site with WordPress.

When you install and activate a plugin or when you try to access plugin page, you might encounter this issue.

Though there are a number of reasons for this to happen, there is one reason that becomes relevant when you encounter this while using Woo Discount Rules.

In some installations, plugins or themes might be using the wp_loaded hook with a wrong priority. This messes up the other plugins that depends on it.

Here is how to fix it when you come across this error when activating or using Woo Discount Rules.

Edit /wp-content/plugins/woo-discount-rules/woo-discount-rules.php

Change this line 



add_action( 'wp_loaded', function () {
}, 0); 


That should fix the issue.

If that does not fix the issue, please review this article explaining all other possible causes

Did this answer your question?