Awesome Support Developer Documentation

wpas__user_email_notifications_tags_values


Signature

apply_filters( 'wpas__user_email_notifications_tags_values', $tags, $user_id );

Typical Usage

Add values to user email template tags

Parameters

  • $tags: Array
  • $user_id: Integer

Returns

  • Array

Located In

  • File: includes\class-user-email-notifications.php
  • Function: WPAS_User_Email_Notification::get_tags_values

First Available

Version 5.1.1

Usage code example

add_filter( 'wpas__user_email_notifications_tags_values', function( $tags, $user_id ) {
    $data = [];
    foreach( $tags as $i => $tag ) {
        $name = trim( $tag['tag'], '{}' );
        switch( $name ) {
            case 'my_tag_1':
                $tag[ 'value' ] = 'My Tag 1 Value';
                break;
            case 'my_tag_2':
                $tag[ 'value' ] = 'My Tag 2 Value';
                break;
        }
        array_push( $data, $tag );
    }
    return $data;
}, 20, 2 );


More Topics In Hooks and Filters

Share: