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

Haven't yet purchased the Discount Rules for WooCommerce - PRO ?

Let's get started,
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 Discount Rules for Woocommerce plugin.

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 

include_once('loader.php');

to

add_action( 'wp_loaded', function () {
    include_once('loader.php');
}, 0); 

and Save it.

That should fix the issue.

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

Do more with PRO


Next Steps:

You may also want to check out these helpful guides:

Still unclear?

If you still have any questions or doubts, please don't hesitate to contact us with a support request for more clarification. We're always happy to help!

Did this answer your question?