• I added directory protection to wp-admin and it works fine since I added an exception to the admin-ajax.php file.

    However, I just realized that regular customers are being asked for the directory username and password when clicking on CHECKOUT.

    What other files should I also excempt so that people can actually make purchases on our site?

    Thanks for your help!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Aethon

    (@aethon)

    I was told that for WordPress to work, it requires access to admin-ajax.php. The code in my htaccess is the following :

    ErrorDocument 401 default
    AuthType Basic
    AuthName “Administration”
    AuthUserFile “/home/zzzzzzzzzzzz/.htpasswds/public_html/wp-admin/passwd”
    require valid-user
    <Files admin-ajax.php>
    Order allow,deny
    Allow from all
    Satisfy any
    </Files>

    And everything was working fine.. .apart from the Checkout page… and really, only people using the admin should be asked to enter the directory username and password.. so what’s going on?

    Thanks!

    Thread Starter Aethon

    (@aethon)

    I have further pinpointed when it tries to call a protected file—it’s when it has to do with signing up or logging in as an existing customer.

    I wonder if that’s one file or many.. I’ll take a look but if you guys know what’s going on, I’d appreciate you telling me what you can since we are in a bit of a mess here because of the commerce system not working and waiting around for me to fumble through it isn’t ideal ??

    Thanks guys!

    Thread Starter Aethon

    (@aethon)

    Would it be “form-login.php”? in /checkout/? I guess I’ll try it and see…

    Thread Starter Aethon

    (@aethon)

    Nope… the carts not even showing up. This is a bit beyond me at the moment. I hope you guys can offer me some hope!

    Thread Starter Aethon

    (@aethon)

    I have one last idea… why don’t I add in an htaccess to allow everything inside the Woocommerce folder? Would that work? and how would I write that?

    Thread Starter Aethon

    (@aethon)

    So strange.. I’m getting an error :

    https://websitedomain.com/cart/ 500 (Internal Server Error) (index):1

    It seems like the plugin just decided to fall apart ??

    Thread Starter Aethon

    (@aethon)

    OK.. this is getting to be absurd. I DID NOT update to WooCommerce 3 however, now the product pages are showing up all wonky and without their images.

    What is going on? Why did the plugin just give up all of a sudden?

    And to compare, I have the same version of WooCommerce (2.6.14) with the same theme on another site and there is no problem.

    There was no plugin recently added… nothing to account for this.

    Someone please help!

    Thread Starter Aethon

    (@aethon)

    OK… I upgraded and it’s back to the original complaint… woocommerce and the other plugins are not in the wp-admin folder (which is the one that’s protected) so why does this password request come up when the checkout page arrives?

    Screen shot

    Thread Starter Aethon

    (@aethon)

    GoDaddy doesn’t know what it is either… they suggested that maybe Woocommerce has places some files in wp-admin, although I don’t see how… and then these are prompting the username/password dialogue box…

    Thread Starter Aethon

    (@aethon)

    OK.. after more reading I think I figured it out…

    Woocommerce is creating a low-level user during checkout/login/etc… so I have to find a way to lock wp-admin from everyone except for the Woocommerce plugin.

    Is that a simpler request? Thanks!

    Thread Starter Aethon

    (@aethon)

    Hey guys… if there is a specific php file that makes the call to wp-admin, I think I could do it…. how many different Woocommerce files act on wp-admin ?

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Shopping cart/checkout not working when wp-admin directory is protected’ is closed to new replies.