getdokan / dokan

Multivendor marketplace platform
https://wordpress.org/plugins/dokan-lite/
254 stars 200 forks source link

Stripe Express (again) accounts disconnected when editing their profiles inside the Dokan dashboard #2310

Closed dan504301 closed 2 months ago

dan504301 commented 3 months ago

Hello Team,

The other day, I made some changes to a couple of vendors, updating details about their businesses inside the Dokan dashboard (biography description field).

Today, I realized that their Stripe accounts were disconnected.

I fixed the issue by restoring the entire website.

Disconnect: The user is not connected to Stripe Express.

These accounts were created between April 2023 and May 2023.

I've also had a vendor in the past who only changed a minor detail in the address in the Dokan dashboard that made their Express account disconnect.

At that time, I didn't realize it, but now it makes sense. That account was connected in April 2023.

dan504301 commented 3 months ago

I saved the state of the website before the restore and I created a staged enviroment.

A look inside the database could give the developers a clue.

Trashed express accounts

The problem is that when trying to reconnect one of these accounts, the vendor only has the option to create a new Stripe Express account, even though they already have an existing Express account within the Stripe admin dashboard.

Based on my limited knowledge, it seems that updating the vendor information from the Dokan vendor dashboard also updates the vendor database entry _dokan_stripe_express_account_info, which corrupts the entries for fields created with older Dokan plugin versions.

This doesn't seem to affect newly connected Express accounts.

I was able to trace back my actions.

I updated the descriptions (vendor biographies) of 10 accounts in the Dokan dashboard. The action that might be the culprit could be saving the vendor info.

9 of those 10 accounts lost the acct_number from the _dokan_stripe_express_account_info database (as shown in the image above).

Only one account, which was disconnected and reconnected through the Dokan dashboard for testing purposes a couple of weeks earlier, did not disconnect.

Those accounts were connected between April and May 2023.

dan504301 commented 3 months ago

Ok, this wasn't hard to look at.

Here is the message for all the 9 disconnected accounts inside the Dokan dashboard.

  1. I only deleted one p line inside the textarea area of vendor biography.
  2. I didn't touched the country field, I'm 100% sure :).
  3. Funny enough there's only one country available to select, because we only accept onboarding from our country.
account
dan504301 commented 2 months ago

@mralaminahamed, I was able to compare the database entries for a modified _dokan_stripe_express_account_info entry, before and after, opening the database using a code editor.

The only difference is at the beginning.

Before

a:19:{s:10:\"account_id\";s:21:\"acct_12345Abcd\";s:18:…..the rest of the _dokan_stripe_express_account_info entry.

After saving the vendor bio modification.

a:19:{s:10:\"account_id\";s:0:\"\";s:18:…..the rest remains identical.

mralaminahamed commented 2 months ago

@daniel-toader,

Thank you for bringing this issue to our attention. We appreciate your feedback as it helps us improve Dokan Pro.

I'm pleased to inform you that we have addressed the issue and submitted a fix. The solution is currently undergoing our standard development review and testing processes. Once these stages are complete, the fix will be included in a future release of Dokan Pro.

We strive to maintain the highest quality in our releases, which is why we have a thorough review process. While I can't provide an exact release date at this time, please be assured that we're working diligently to incorporate this fix as soon as possible.

Thank you for your patience and continued support of Dokan Pro. If you have any further questions or concerns, please don't hesitate to reach out.

dan504301 commented 2 months ago

@mralaminahamed,

I'm really glad I was able to help, thank you!