Regarding the My Account page override - MarketKing doesn't normally override My Account, so I'm not entirely sure what you're seeing there. Could you explain a bit more about what's happening? That would help me understand the issue better.
For the login redirect you're trying to achieve (vendors → /vendor-dashboard/, non-vendors → /become-a-seller/ or My Account), you can use this code snippet:
This applies to the woocommerce_login_redirect hook. However, whether this works will depend on whether your Google/Facebook login plugin uses this same hook.
Regarding prefilling the vendor application form with user meta data (name, email, phone) - MarketKing should actually do this automatically on the vendor registration form, IF that data already exists. This is based on the "billing connection" setting of each registration field. For example, if the billing connection is set to "company name" and the user already has company name saved under their billing info, that field should be prefilled in the become a vendor form.
Hi team,
We want to let both customers and sellers log in only through Google or Facebook.
Here’s what we’re trying to do:
Can you please tell us:
We just want to make the login and seller onboarding as smooth as possible.
Hi Aleksander,
Thanks for reaching out, glad to assist.
To check if a user is a vendor, you can use:
Regarding the My Account page override - MarketKing doesn't normally override My Account, so I'm not entirely sure what you're seeing there. Could you explain a bit more about what's happening? That would help me understand the issue better.
For the login redirect you're trying to achieve (vendors → /vendor-dashboard/, non-vendors → /become-a-seller/ or My Account), you can use this code snippet:
https://pastecode.io/s/drfszd40
This applies to the
woocommerce_login_redirecthook. However, whether this works will depend on whether your Google/Facebook login plugin uses this same hook.Regarding prefilling the vendor application form with user meta data (name, email, phone) - MarketKing should actually do this automatically on the vendor registration form, IF that data already exists. This is based on the "billing connection" setting of each registration field. For example, if the billing connection is set to "company name" and the user already has company name saved under their billing info, that field should be prefilled in the become a vendor form.
Let me know if you run into any issues,
Kind regards,
Stefan