Awesome Support Developer Documentation

wpas_email_notifications_tags_values


Signature

apply_filters( 'wpas_email_notifications_tags_values', $tags, $post_id );
 

Typical Usage

Add values to email template tags

Parameters

  • $tags: Array
  • $post_id: Integer

Returns

  • Array

Located In

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

First Available

Version 3.0.0

Usage code example

add_filter( 'wpas_email_notifications_tags_values', function( $tags, $post_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 Filter Hooks

Share: