Adding Your Own Custom Shortcodes

If you would like to add your own custom shortcodes to BNFW, you can add do so by using the following code as a starting point. This code is a filter for the wp_mail function within WordPress.

If you need help with this, you may need to enlist a developer to write the code you need to add the shortcode you want to output in the message body of your notification(s).

add_filter('wp_mail', function($args) {
$args['message'] = do_shortcode($args['message']);
return $args;
}, 1, 1);