Skip to content

Instantly share code, notes, and snippets.

@pippinsplugins
Created March 28, 2016 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pippinsplugins/9097ebbf8089dfe39863 to your computer and use it in GitHub Desktop.
Save pippinsplugins/9097ebbf8089dfe39863 to your computer and use it in GitHub Desktop.
<?php
function edd_gf_add_priority_to_tags( $tags, $feed, $entry, $form ) {
$email_id = $feed['meta']['customer_email'];
$email = $entry[ $email_id ];
$user = get_user_by( 'email', $email );
if( $user && rcp_is_active( $user->ID ) ) {
$tags[] = 'priority';
}
return $tags;
}
add_filter( 'gform_helpscout_tags', 'edd_gf_add_priority_to_tags', 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment