Title: Extra replaceable tags?
Last modified: August 30, 2021

---

# Extra replaceable tags?

 *  Resolved [Deea](https://wordpress.org/support/users/whereisdeea/)
 * (@whereisdeea)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/extra-replaceable-tags/)
 * Hey,
 * Is it possible to add extra replaceable tags in emails? We’d like to add the 
   commission’s ID in both administrator and affiliate email notifications. From
   what I see, this tag isn’t available in the plugin.
 * Thank you!

Viewing 1 replies (of 1 total)

 *  Plugin Author [iova.mihai](https://wordpress.org/support/users/iovamihai/)
 * (@iovamihai)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/extra-replaceable-tags/#post-14822030)
 * Hey [@whereisdeea](https://wordpress.org/support/users/whereisdeea/),
 * Currently, this can only be done using code. I recommend adding the following
   code into your website using a code snippets plugin:
 *     ```
       /**
        * Registers the "commission_id" merge tag for email notifications.
        *
        * @param array $tags
        *
        * @return array
        *
        */
       function slicewp_custom_register_merge_tags_commission_id( $tags ) {
   
       	$tags['commission_id'] = array(
       		'description' => "Replaces the tag with the commission ID",
       		'callback'	  => 'slicewp_custom_merge_tag_commission_id_callback'
       	);
   
       	return $tags;
   
       }
       add_filter( 'slicewp_register_merge_tags', 'slicewp_custom_register_merge_tags_commission_id' );
   
       /**
        * The callback for the "commission_id" merge tag.
        *
        * @param array $data
        *
        * @return string
        *
        */
       function slicewp_custom_merge_tag_commission_id_callback( $data ) {
   
       	if ( empty( $data['commission'] ) )
       		return '';
   
       	return $data['commission']->get( 'id' );
   
       }
       ```
   
 * With the code added, you can add the {{commission_id}} tag to your email notification
   content and title, which will get replaced with the actual commission ID when
   the email is sent.
 * Please try it out and let me know how it goes.
 * Best wishes,
    Mihai

Viewing 1 replies (of 1 total)

The topic ‘Extra replaceable tags?’ is closed to new replies.

 * ![](https://ps.w.org/slicewp/assets/icon-256x256.png?rev=2432848)
 * [Affiliate Program Suite — SliceWP Affiliates](https://wordpress.org/plugins/slicewp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/slicewp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/slicewp/)
 * [Active Topics](https://wordpress.org/support/plugin/slicewp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/slicewp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/slicewp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [iova.mihai](https://wordpress.org/support/users/iovamihai/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/extra-replaceable-tags/#post-14822030)
 * Status: resolved