I developed a plugin for my citrus payment gateway.I created a shortcode to manage it. It was running absolutely fine some days ago.Now I don't know who changed what, now that shortcode is running twice :(
This is my code I am using.
add_shortcode('citrusafterpayment', 'citrusafterpayment_function');
function citrusafterpayment_function()
{
mail('[email protected]','check-in','asd');
global $wpdb;
if(isset($_REQUEST['TxStatus']) && $_REQUEST['TxStatus'] != '')
{
if($TxStatus == 'CANCELED')
{
$return_msg = '<div class="row-fluid"><div class="span12"> <div class="error">You have canceled your transaction.</div></div></div>';
return $return_msg;
}
}
}
I am using this shortcode on one of my webpage. Whenever that page is hitting I am getting emails two times.
I googled it but there is no useful result.
Please help me.