Skip to content

Instantly share code, notes, and snippets.

@clifgriffin
Created February 5, 2014 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save clifgriffin/8827396 to your computer and use it in GitHub Desktop.
Save clifgriffin/8827396 to your computer and use it in GitHub Desktop.
Change comment notification recipient for Shopp products
<?php
add_filter('comment_notification_recipients', 'override_comment_notice_repicient', 10, 2);
function override_comment_notice_repicient($emails, $comment_id) {
$comment = get_comment( $comment_id );
if ( empty( $comment ) )
return $emails;
$post = get_post( $comment->comment_post_ID );
if ( $post->post_type != "shopp_product")
return $emails;
return array('you@hotmail.com');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment