public function emails_sent($email_order, $user_id, $email, $email_to, $cname, $trigger) { global $wpdb; // load order and email row $email = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$wpdb->prefix}followup_emails` WHERE `id` = '%d'", $email_order->email_id)); FUE_Reports::email_log($email->id, $email_order->id, $user_id, $email->name, $cname, $email_to, $email_order->order_id, $email_order->product_id, $trigger); }