Notification
WordPress.orgExtensionsSupport
Version 7
Version 7
  • Notification – Custom Notifications and Alerts for WordPress
  • Known issues
  • πŸ€Έβ€β™€οΈ User guide
    • How Notification plugin works
    • Who can use this plugin
    • How to create Notifications
    • Troubleshooting
    • Advanced
      • How to escape { character
      • Background processing
      • How to setup different FROM address for different Notifications
      • Custom Post Type support
  • πŸ”§Developer
    • General
      • Plugin loading chain
      • Runtime
      • Extension possibilities
      • Creating an extension
      • Bundling Notification plugin
      • White label mode
    • Notifications
      • Suppressing the Notification
      • JSON synchronization
      • Programmatic Notifications
    • Triggers
      • List of all default Triggers
      • Custom Trigger
      • Enable support for non-public Custom Post Type
      • Adding Merge Tags to existing Triggers
      • Postponing the Trigger action
      • Delaying Trigger execution with Cron
    • Carriers
      • Custom Carrier
      • Adding custom fields to Carrier form
      • Suppressing the Carrier
    • Recipients
      • Custom Recipient
    • Snippets
      • General
        • Automatic Trigger testing
        • Allow other roles to edit Notifications
        • Allow sending Notification while logging is active
        • Programmatic Notification with manual Trigger
        • Background Processing filter
      • Triggers
        • Post
        • User
      • Integations
        • WP All Import
        • MemberPress
        • Gutenberg
  • 🧩Extensions
    • Installation
    • Planned extensions
    • 3rd Party Extensions
    • Custom Fields
      • v1.3
    • Scheduled Triggers
    • Slack
    • Twilio
Powered by GitBook
On this page
  1. Developer
  2. Snippets
  3. Triggers

User

Adding default Merge Tags to "User registered" Trigger

add_action( 'notification/trigger/merge_tags', function( $trigger ) {

	if ( $trigger->get_slug() !== 'user/registered' ) {
		return;
	}

	$trigger->add_merge_tag( new BracketSpace\Notification\Defaults\MergeTag\User\UserNicename() );
	$trigger->add_merge_tag( new BracketSpace\Notification\Defaults\MergeTag\User\UserDisplayName() );
	$trigger->add_merge_tag( new BracketSpace\Notification\Defaults\MergeTag\User\UserFirstName() );
	$trigger->add_merge_tag( new BracketSpace\Notification\Defaults\MergeTag\User\UserLastName() );
	$trigger->add_merge_tag( new BracketSpace\Notification\Defaults\MergeTag\User\UserBio() );

} );
PreviousPostNextIntegations

Last updated 5 years ago

πŸ”§