Skip to content

Instantly share code, notes, and snippets.

@soderlind
Created July 5, 2021 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soderlind/d369cd3a84af4667d06cc68517e3fd53 to your computer and use it in GitHub Desktop.
Save soderlind/d369cd3a84af4667d06cc68517e3fd53 to your computer and use it in GitHub Desktop.
Hardwire Ninja Forms from name and from address.
<?php
/**
* Hardwire Ninja Forms from name and from address.
*/
add_filter( 'ninja_forms_run_action_settings', function ( $action_settings, $form_id, $action_id, $form_settings ) {
if ( 'email' === $action_settings['type'] ) {
$action_settings['from_name'] = 'from name';
$action_settings['from_address'] = 'from@name.tld';
}
return $action_settings;
}, 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment