Actions and Filters

Filters: #

Add custom shortcodes to the list: #

add_filter( 'wpn_custom_shortcodes', 'my_custom_shortcode', 10, 1 );

function my_custom_shortcode($shortcodes) {

    $shortcodes[] = array(
        'shortcode'   => '{{my-custom-shortcode}}',
        'description' => 'This is a custom shortcode'
    );

    return $shortcodes;
}

Modify the notification text before it’s sent: #

add_filter( 'wpn_notification_shortcodes', 'apply_my_shortcodes', 10, 1 );

function my_custom_shortcode($notification) {

    // Find and replace your shortcode here.

    return $notification;
}
Actions and Filters
We use cookies for analytics. By using this website, you agree to our use of cookies.