Closed ciriousjoker closed 3 years ago
A couple of things I noticed:
wp_users/{userId}
, probably because userId
is unknown/empty. It also doesn't create a new document with a random document id like it usually does when the id is undefinedAlso, for context about the collection names:
@dalenguyen
wp_users
(fails, because no userId
)wp_users
(fails, because no userId
) <-- This shouldn't happen, after the import the userId field for that wordpress account should be setwp_users
(this works)userId
field for wordpress users on import@dalenguyen I managed to fix it.
Add this snippet into <plugin>/includes/service/class.firebase-service.php
:
public function import_users_to_firebase($users) {
...
// Set firebase_uid during import
foreach($users as $user) {
update_usermeta($user->ID, "firebase_uid", $user->user_login);
}
return ...;
}
I obviously cannot commit this anywhere, but feel free to include it in the next plugin version.
Thanks, @CiriousJoker. It probably what happens. I will add it to the next release 🙌
Updated to the plugin 🙏
Describe the bug
userId
field in the synced Firestore woocommerce membership document is generally empty for the imported accounts.firstname.lastname
MLVs8g1UR0ab...
(shortened) seem to always get synced correctlyTo Reproduce Steps to reproduce the behavior:
I can't really provide reliable steps to reproduce this, maybe this works:
Integrate Firebase PRO
Integrate Firebase PRO
Expected behavior
The
userId
field in Firestore should never be empty if there exists a Firebase Auth userScreenshots
Screenshots If applicable, add screenshots to help explain your problem. You can find the error code from inspecting the browser.
Desktop (please complete the following information):
Additional context