[php]add_action( ‚wppb_register_success‘, ‚wppbc_add_role_after_completing_form‘, 20, 3 );
function wppbc_add_role_after_completing_form( $http_request, $form_name, $user_id ){
if ($form_name != ‚registrierung-fuer-unternehmen-und-organisationen‘) return;
$user = new WP_User($user_id);
$user->add_role(‚customer‘);
}[/php]
Afterwards when users complete the form you pointed out to me, they should also get the `customer` user role alongside the one they select.
Related Articles
- Fix Elementor fixed Background sizing
- Cronjob Überlappung verhindern – flock()
- WordPress Update Hinweise deaktivieren
- WP Download Manager "attached file is missing/deleted" Fehler
- WordPress Staging: Uploads Ordner von Production Seite einlesen (per htaccess)
- WC Attribute Komma durch Linebreak ersetzen
- Profile Builder Pro User Listing Filter by multiple meta key values
- Resize anstatt Crop von Avatar Bildern in Profile Builder Pro
- Current User link shortcode Profile Builder Pro
- Profile Builder Felder Übersetzung mit WPML