Created
October 3, 2022 21:28
-
-
Save rafiahmedd/a6cb23e2e2426729362dc32c4eeebc96 to your computer and use it in GitHub Desktop.
Stop fluent support user from opening a ticket via email piping if the user not exist in fluent crm
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 | |
add_action('fluent_support/before_ticket_create_from_email', function($responseOrTicketData, $customer){ | |
if (function_exists('FluentCrmApi')){ | |
$contactApi = FluentCrmApi('contacts'); | |
$contact = $contactApi->getContact($customer->email); | |
if (!$contact) { | |
exit; | |
} | |
} | |
}, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment