BUG: uc_admin_override_WP() breaks AJAX
-
When uc_admin_override_WP() is called on admin_init it doesn’t perform a check to see if the plugin is active.
As a result any call that triggers admin_init will redirect users that are not logged in to the front-end even when the under construction functionality is disabled through its configuration.
This will also happen for calls made to wp-admin/admin-ajax.php disabling every other plugin using WordPress its build-in plugin functionality for users that are not logged in e.g. WooCommerce price update on checkout, disabling users to complete their order.
To solve the problem uc_admin_override_WP() should at least check if the under construction functionality is disabled and/or check where admin_init was triggered e.g. using is_blog_admin() which checks if the user requests an admin screen.
For a temporary fix the plugin should be disabled on the plugin screen and not through its own configuration.
Another note to the developer is that I noticed that after uc_admin_override_WP() calls wp_redirect() script execution isn’t terminated using die or exit.
https://www.ads-software.com/extend/plugins/underconstruction/
- The topic ‘BUG: uc_admin_override_WP() breaks AJAX’ is closed to new replies.