Hi, I’m trying to redirect vendors to a page by selected category after registration but I couldn’t get categories and I couldn’t redirect vendors to another page. I used this snippet:
Could you please provide more details about your use case so we can better understand your setup and see how we can help?
In particular, please let us know whether you have direct vendor registration enabled and share any other details relevant to your registration process [please provide all the registration steps].
By default, users and vendors follow the same registration process and are registered in WordPress as Subscribers (general users). A user becomes a vendor once they have at least one published listing.
However, this behavior can be bypassed if direct vendor registration is enabled. This option separates the registration processes for users and vendors, allowing vendors to be registered as Contributors.
The more details you can share about your setup and the behavior you’re experiencing, the more accurately we’ll be able to assist you.
I’m using direct registration and I want to redirect vendors to custom page instead of profile page after form is submitted if the selected category id is 2699.
Hi @Mertozdemirci, the vendor/create hook fires when /register-vendor/ is first opened, because that’s when HivePress creates the draft vendor. No category has been selected at that point, so get_categories__id() is empty.
With direct registration, the redirect to the vendor profile happens in the vendor_register_complete_page route. You can wrap that route’s redirect so the core logic still runs (publishing the vendor and sending the admin email) and then change the destination: