Created
February 5, 2014 16:25
-
-
Save clifgriffin/8827396 to your computer and use it in GitHub Desktop.
Change comment notification recipient for Shopp products
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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