Hi,
I have read the notification handler post (http://www.s2member.com/kb/building-an-api-notification-handler/) and it’s working well.
My question is that if I want to have several notification handlers, is it better to place all of them into 1 plugin file, or have a separate one for each?
I’m asking with regard to WP efficiency of course. I would say use 1 file, so WP only has to load 1 plugin and hook, but I want to make sure.
So in the end, it would look something like this:
<?php
add_action('init', 's2_notification_handlers');
function s2_notification_handlers() {
if(!empty($_GET['s2_payment_notification']))
{...
exit; }
if(!empty($_GET['s2_EOT_notification']))
{...
exit; }
if(!empty($_GET['s2_registration_notification']))
{...
exit; }
}