# How to Redirect Vendors After Registration?

**URL:** <https://community.hivepress.io/t/how-to-redirect-vendors-after-registration/18030>\
**Category:** HivePress\
**Tags:** code\
**Created:** [October 13, 2026, 2:33pm UTC](https://community.hivepress.io/t/how-to-redirect-vendors-after-registration/18030 "2026-10-13T14:33:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mertozdemirci](https://community.hivepress.io/user_avatar/community.hivepress.io/mertozdemirci/32/14697_2.png) [@Mertozdemirci](https://community.hivepress.io/u/Mertozdemirci)\
**Post date:** [October 13, 2026, 2:33pm UTC](https://community.hivepress.io/t/how-to-redirect-vendors-after-registration/18030/1 "2026-10-13T14:33:51Z")

</div>

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:

```php
add_action('hivepress/v1/models/vendor/create', function ($vendor_id, $vendor) {

    if( ! $vendor ) {
       return;
    }

    
    $category_ids = $vendor->get_categories__id();

    if ( ! is_array($category_ids) ) {
        return;
    }

    $category_id = reset($category_ids);

    if ($category_id == 2699) {
        wp_redirect(site_url("/reg-success"));
        exit;
    }

}, 10, 2);

```

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [October 13, 2026, 2:33pm UTC](https://community.hivepress.io/t/how-to-redirect-vendors-after-registration/18030/2 "2026-10-13T14:33:51Z")

</div>

Thanks for your message — our team will reply shortly.

In the meantime, you can also get instant help from our [AI Assistant](https://www.chatbase.co/PdfFucPZ0vUmh3dfM-oe1/help), familiar with all the docs and solutions we’ve shared over the years.

---

<div class="post-metadata">

**Author:** ![kseniia](https://community.hivepress.io/user_avatar/community.hivepress.io/kseniia/32/13513_2.png) [@kseniia](https://community.hivepress.io/u/kseniia)\
**Post date:** [October 13, 2026, 3:33pm UTC](https://community.hivepress.io/t/how-to-redirect-vendors-after-registration/18030/3 "2026-10-13T15:33:18Z")

</div>

Hi,

Welcome to the community! 🐝

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.

---

<div class="post-metadata">

**Author:** ![Mertozdemirci](https://community.hivepress.io/user_avatar/community.hivepress.io/mertozdemirci/32/14697_2.png) [@Mertozdemirci](https://community.hivepress.io/u/Mertozdemirci)\
**Post date:** [October 13, 2026, 3:47pm UTC](https://community.hivepress.io/t/how-to-redirect-vendors-after-registration/18030/4 "2026-10-13T15:47:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ChrisB](https://community.hivepress.io/user_avatar/community.hivepress.io/chrisb/32/14185_2.png) [@ChrisB](https://community.hivepress.io/u/ChrisB)\
**Post date:** [October 13, 2026, 6:53pm UTC](https://community.hivepress.io/t/how-to-redirect-vendors-after-registration/18030/6 "2026-10-13T18:53:17Z")

</div>

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:

```auto
add_filter(
	'hivepress/v1/routes',
	function ( $routes ) {
		$original = $routes['vendor_register_complete_page']['redirect'] ?? null;

		if ( ! is_callable( $original ) ) {
			return $routes;
		}

		$routes['vendor_register_complete_page']['redirect'] = [
			[
				'callback' => function () use ( $original ) {

					// Run the default logic (publishes vendor, sends admin email).
					$redirect = call_user_func( $original );

					$vendor = hivepress()->request->get_context( 'vendor' );

					if ( $redirect && $vendor && in_array( 2699, array_map( 'absint', (array) $vendor->get_categories__id() ), true ) ) {
						return home_url( '/reg-success/' );
					}

					return $redirect;
				},
				'_order' => 5,
			],
		];

		return $routes;
	},
	1000
);

```

I hope this helps!

Cheers,  
Chris ✌
