-
-
Save pippinsplugins/9097ebbf8089dfe39863 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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