Change Send Credentials

Change Send Credentials via Email text

This function will change the Send these credentials via email text in front-end registration form.

Make sure to:

  • change text on line 7

wppb_send_credentials_checkbox_logic is located in Profile Builder: /front-end/class-formbuilder.php

1
2
3
4
5
6
7
8
/*
 * Change Send Credentials via Email text. Tags: send credentials, email
 */
add_filter('wppb_send_credentials_checkbox_logic', 'wppbc_send_credentials_checkbox', 10, 2);
function wppbc_send_credentials_checkbox($requestdata, $form){
   return '<li class="wppb-form-field wppb-send-credentials-checkbox"><label for="send_credentials_via_email"><input id="send_credentials_via_email" type="checkbox" name="send_credentials_via_email" value="sending"'.( ( isset( $request_data['send_credentials_via_email'] ) && ( $request_data['send_credentials_via_email'] == 'sending' ) ) ? ' checked' : '' ).'/>'.
   __( 'Send these credentials via email.', 'profilebuilder').'</label></li>';
}

Send Credentials via Email hidden and enabled by default

This function will make Send these credentials via email hidden and enabled by default.

1
2
3
4
5
6
7
/*
 * Send Credentials via Email hidden and enabled by default. Tags: send credentials, email
 */
add_filter('wppb_send_credentials_checkbox_logic', 'wppbc_send_credentials_enabled', 10, 2);
function wppbc_send_credentials_enabled($requestdata, $form){
   return '<li class="wppb-form-field wppb-send-credentials-checkbox"><input id="send_credentials_via_email" type="hidden" name="send_credentials_via_email" value="sending"/></li>';
}