I have a client whose site uses WooCommerce for their shopping cart. After performing a major WooCommerce update, orders would not go through for logged in administrators (which is annoying especially when testing orders). The checkout page looked normal, everything seemed fine, until I clicked the Place Order button. I was then scrolled back up to the top of the page, and given the message “We were unable to process your order, please try again”. If I refresh the page, I have been logged out of my account. This is the source of the issue – the force logout. WooCommerce can’t place the order because somewhere during the order placement process it encounters a problem between being on a forced HTTPS (secure) page, and communicating with a non-HTTPS (unsecure) admin page.
So, to solve the problem, you will want to edit your wp-config.php file found in your website’s root directory (you want to be accessing your site files via FTP or SFTP, or File Manager from your hosting dashboard). Download the wp-config.php file to your computer and open it in a text editor program (I use TextWrangler, you can pretty much use anything – just don’t use Microsoft Word!).
Find a blank line, hit enter, and paste in the following:
/* forcing SSL for admin area to solve issue of being logged out when placing woocommerce order logged in as admin */
Save the file, and now re-upload it to your website files via FTP or SFTP (or File Manager). You will want to overwrite the file on the server.
That should solve your issue about being logged out of your wordpress admin account when trying to place an order via WooCommerce!
We are pleased to have been named one of the top eCommerce web design companies for 2020.