How to solve the WordPress session problem in Chrome 84

How to solve the WordPress session problem in Chrome 84

The problem we and WordPress users have been fighting for months is the problem of failed Easy Digital Downloads and WooCommerce payments with the new version of Google Chrome. All payments were made through bank payment gateways, They were faced with the message of not receiving payment information due to using SoapClient. This problem only existed in the new version of Google Chrome, and we had to solve the WordPress session problem in Chrome 84 by any possible method.

Only in the new version of Google Chrome!

This problem only appeared in Google Chrome browser version 84 and later, and in browsers like Firefox we had no problem with payment. So we concluded that the problem is with Google Chrome.

We were involved in this case for several months. We examined foreign sites and support forums of WordPress and Google Chrome to websites providing hosting services. Several of the dear hosting providers also suggested that they would investigate and solve the problem with an amount of about 20 dollars. But it was not a matter of money. We wanted to find this problem and provide you with the solution as a WordPress reference.

Check for changes to the new version of Google Chrome

As a result, we decided to go to Google Chrome Changelog and see what features and changes have been added to the new version of Chrome. We came across an issue related to the greater security of Google Chrome. Yes Google friends have added a feature to Google Chrome that makes it safe for the user, if you move the user to another website and that website holds the user for more than 20 seconds after the user came to your website, all sessions are rewritten It becomes.

What is a Session

The session is actually a special variable of the cookie that is stored in the browser to check that the guest user who made the purchase on our website, with this particular session stored in the browser is the same person who has already been referred from our website to the payment gateway. When a user is not logged in to our website, with cookies and sessions we can set values ​​to identify that user.

Now that Chrome was deleting our user sessions, naturally, our user could not complete their purchase. Because Easy Digital Downloads or WooCommerce did not recognize this user at all.

Solve the session problem in Google Chrome

To solve this problem, it is enough to disable this feature of Google Chrome for our website. Of course, disabling this feature requires changing your web server rules, which must be done by the hosting administrator. But there is another way in WordPress called Defining. Just put the following code in line 2 of the wp-config.php file to solve the problem forever.

define( 'WP_SAMESITE_COOKIE', 'None' );

Just as easily. You have solved the problem of failed payments in the new version of Google Chrome.

Good luck. 🙂

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

What do you think about this?