I feel it has something to do with this section of the plugin. For some reason, it does not recognize the custom post types within the $post variable…or so that’s my uneducated guess!
/**
Sends an email notification of a new post
*/
function publish($post = 0, $preview = '') {
if ( !$post ) { return $post; }
if ( $preview == '' ) {
// we aren't sending a Preview to the current user so carry out checks
$s2mail = get_post_meta($post->ID, 's2mail', true);
if ( (isset($_POST['s2_meta_field']) && $_POST['s2_meta_field'] == 'no') || strtolower(trim($s2mail)) == 'no' ) { return $post; }
// are we doing daily digests? If so, don't send anything now
if ( $this->subscribe2_options['email_freq'] != 'never' ) { return $post; }
// is the current post a page
// and should this not generate a notification email?
if ( $this->subscribe2_options['pages'] == 'no' && $post->post_type == 'page' ) {
return $post;
}
// is this post set in the future?
if ( $post->post_date > current_time('mysql') ) {
// bail out
return $post;
}
//Are we sending notifications for password protected posts?
if ( $this->subscribe2_options['password'] == "no" && $post->post_password != '' ) {
return $post;
}
$post_cats = wp_get_post_categories($post->ID);
$check = false;
// is the current post assigned to any categories
// which should not generate a notification email?
foreach ( explode(',', $this->subscribe2_options['exclude']) as $cat ) {
if ( in_array($cat, $post_cats) ) {
$check = true;
}
}
if ( $check ) {
// hang on -- can registered users subscribe to
// excluded categories?
if ( '0' == $this->subscribe2_options['reg_override'] ) {
// nope? okay, let's leave
return $post;
}
}
// Are we sending notifications for Private posts?
// Action is added if we are, but double check option and post status
if ( $this->subscribe2_options['private'] == "yes" && $post->post_status == 'private' ) {
// don't send notification to public users
$check = true;
}
// lets collect our subscribers
if ( !$check ) {
// if this post is assigned to an excluded
// category, or is a private post then
// don't send public subscribers a notification
$public = $this->get_public();
}
$post_cats_string = implode(',', $post_cats);
$registered = $this->get_registered("cats=$post_cats_string");
// do we have subscribers?
if ( empty($public) && empty($registered) ) {
// if not, no sense doing anything else
return $post;
}
}