- Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.43, 5.5.24 - 5.5.27, 5.6.8 - 5.6.11
- Fatal error: Cannot redeclare ninja_forms_change_from_address() (previously declared in /in/HZIpb:8) in /in/HZIpb on line 26
Process exited with code 255.
<?php
/*
Plugin Name: Ninja Forms - Change From_Rev1
*/
add_action( 'ninja_forms_email_admin', 'ninja_forms_change_from_address' );
function ninja_forms_change_from_address(){
global $ninja_forms_processing;
if( 2 == $ninja_forms_processing->get_form_ID() ) {
$user_email = $ninja_forms_processing->get_field_value( 10 );
$user_name = $ninja_forms_processing->get_field_value( 2 );
$user_email = $user_name." <".$user_email.">";
$ninja_forms_processing->update_form_setting( 'email_from', $user_email );
}
}
add_action( 'ninja_forms_email_admin', 'ninja_forms_change_from_address' );
function ninja_forms_change_from_address(){
global $ninja_forms_processing;
if( 1 == $ninja_forms_processing->get_form_ID() ) {
$user_email = $ninja_forms_processing->get_field_value( 24 );
$user_name = $ninja_forms_processing->get_field_value( 1 );
$user_email = $user_name." <".$user_email.">";
$ninja_forms_processing->update_form_setting( 'email_from', $user_email );
}
}