Home / Admin / Modify User Role on Checkout
Duplicate Snippet

Embed Snippet on Your Site

Modify User Role on Checkout

Modify the user role that is given to users that register during checkout

Code Preview
php
<?php
function pw_edd_customer_user_role( $user_args, $user_data ) {
	
	// Set the role to the role you wish customers to have
	$user_args['role'] = 'customer';
	return $user_args;
}
add_filter( 'edd_insert_user_args', 'pw_edd_customer_user_role', 10, 2 );

Comments

Add a Comment