Home Support General HivePress Permissions for making listings

Permissions for making listings

  • Author
    Posts
  • Mark

    It seems that anyone who has an account can request to create a listing? How do I make it so that I upgrade an account to make them a “vendor” and the rest of accounts are classified as Customers?

    ihor developer

    There’s no such option at the moment, but there’s a code snippet that you can add to a child theme functions.php file:

    add_filter(
    	'option_hp_listing_enable_submission',
    	function( $value ) {
    		if ( ! current_user_can( 'edit_posts' ) ) {
    			return false;
    		}
    
    		return $value;
    	}
    );

    Then if you set “contributor” role for some users only these users will be able to submit listings.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.