Allow access to admin-post Closes #3814

This commit is contained in:
Mike Jolley 2013-09-24 15:21:40 +01:00
parent c58d5d5ea4
commit 51ee4ee2d8
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class WC_Admin {
public function prevent_admin_access() {
$prevent_access = false;
if ( 'yes' == get_option( 'woocommerce_lock_down_admin' ) && ! is_ajax() && ! ( current_user_can( 'edit_posts' ) || current_user_can( 'manage_woocommerce' ) ) ) {
if ( 'yes' == get_option( 'woocommerce_lock_down_admin' ) && ! is_ajax() && ! ( current_user_can( 'edit_posts' ) || current_user_can( 'manage_woocommerce' ) ) && basename( $_SERVER["SCRIPT_FILENAME"] ) !== 'admin-post.php' ) {
$prevent_access = true;
}