Public Ticket #4571337

Global base site URL?

Closed
Comments
3 Tickets
Jeff started the conversation 4 months ago on June 20, 2026 at 6:38pm

I just purchased Marketking. I'm setting up vendors and I see the checkbox that says "enable base site URL" for this vendor. I would prefer that all vendors have base site URL enabled by default. Is there a way to do this, or do I have to check the box manually for each vendor?

2,762
KingsPlugins replied 4 months ago on June 20, 2026 at 11:59pm

Hi Jeff,

Thank you for purchasing our plugin!

There isn't a built-in global setting for this, but you can enable it automatically for all vendors by adding this code snippet to your theme's functions.php or any code snippets plugin:

add_filter( 'get_user_metadata', function( $value, $user_id, $meta_key, $single ) {
	if ( $meta_key === 'marketking_vendor_store_url_base' ) {
		return '1';
	}

	return $value;
}, 10, 4 );

 

One thing to keep in mind: since these URLs appear directly on your site (e.g. site.com/vendorname), I'd recommend using Manual approval for new vendor registrations rather than Automatic. With automatic approval, anyone could register a vendor account with a store URL like "vip" or "promo", and that link would immediately go live on your site pointing to their store. With manual approval, you can review each store URL before it goes live.

Let me know if I can help with anything,

Kind regards,
Stefan

3 Tickets
Jeff replied 4 months ago on June 21, 2026 at 10:04pm

Thank you so much! I'm new to code snippets but I'm excited to learn. I'm using WPCode... quick followup question: I'm assuming this should be a PHP snippet, correct? There are other options such as HTML/CSS/JS snippets, but I chose PHP for this one.

And thank you for the advice about manual approval. That is my plan moving forward. :-)

When I create a new user from the admin side, and then set them as a vendor, I still don't see the "enable base site URL" check box checked automatically. I did save and activate the snippet. But am I correct that this snippet will work correctly when vendors register from the front end?

3 Tickets
Jeff replied 4 months ago on June 22, 2026 at 3:39pm

Update: I tested registering a new vendor from the front end (with manual approval), and the base site URL options was already checked the new vendor account when using the code snippet. :-) Thanks!

2,762
KingsPlugins replied 3 months ago on June 23, 2026 at 8:42pm

Hi Jeff,

Great to hear things seem to be working :) yes, that's a PHP snippet.

If you have any other questions or need help with anything, please reach out anytime!

Kind regards,
Stefan

Sign In