How to solve the session problem in Google Chrome 84

solve the session problem in Google Chrome
Solve the session problem in Google Chrome

The problem we and wordpress users have been struggling with 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 session problem in Google 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 Iranian sites 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 the Google Chrome Changelog and see what features and changes have been added in the new versions 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 site and that website holds the user for more than 20 seconds after the user came to your site, all sessions are rewritten It becomes.

What is a Session

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 site, with this particular session stored in the browser is the same person who has already referred from our site to the payment gateway شده. When a user is not logged in to our site, 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 site. Of course, disabling this feature requires changing your web server rules, which must be done by the hosting. 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. 🙂

What do you think about this?

Please submit your comment only on the subject of this article. Your questions will be answered by the community.

Ask Question