Hi,
I'm using latest osclass version on my website and installed 'Contact Counter' plugin.
Im able to see increase in contact counter(in managed listings of admin panel) when user sends inquiry email.
It is happening due to following code. Counter increase code is attached to email_item_inquiry hook
osc_add_hook('hook_email_item_inquiry', 'contact_counter_increase');
//osc_add_hook('contact_form', 'contact_counter_increase');
function contact_counter_increase($item) {
ModelContactCounter::newInstance()->increaseItemStat($item['id']) ;
}
But I want to increase the counter when contact button(which opens above email form) is clicked not when the email is sent.
Can any guide me how to change hook from email_inquiry to button click