Skip to content

Instantly share code, notes, and snippets.

@rafiahmedd
Created October 3, 2022 21:28
Show Gist options
  • Save rafiahmedd/a6cb23e2e2426729362dc32c4eeebc96 to your computer and use it in GitHub Desktop.
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
<?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