Contact Notification Emails Not Send After Comment Approval in WordPress

when some one post in my blog, i (admin) get reply that some one posted, but when i approved that or reply on that, the poster dont get any notifications

so how will i be able to let poster know that there is a reply on his post ??

LVL 29
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Personally I have no clue if it does send upon approval by default. If it doesn't you can use a hook:

Runs when the status of a comment changes. Action function arguments: comment ID, status string indicating the new status ("delete", "approve", "spam", "hold").


hope that helps.
fosiul01Author Commented:
do i have to add that code in wp_set_comment_status ??

another thing

like from word press admin section,

when i click on users post , there is a section call "Reply"

i thought, if i click on Reply, it will go to users inbox directly, but its does not, when i click on Reply and submit

its actually put my comments in the webstie rather then emailing to the users

so i want that as well..but dont know how

No you would have to write a plugin to fire off the add_action. I'll look into it now.
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

fosiul01Author Commented:
The code snippet is a very simple piece, there's no validation and so on, but it's a proof of concept that works and you can build on it.

I wouldn't advise to use it outside of a development environment until you are 100% sure that all data has been sanitized. This is just an example to get you on the right track.
Plugin Name: Comment Notification
Version: 1.0
Description: Adds Notification to Comments
Author: Kysol

	/* Plugin Code */
		function comment_status_change( $id, $status )
			if ( $status == 'approve' )
				$comment = get_comment( $id );

				if ( $comment->comment_author_email )
						get_bloginfo( 'name' ) . ' - Comment Approved',
						'Your comment: "' . $comment->comment_content . '" has been approved.',

			return $id;

	/* Wordpress Hooks */
		add_action( 'wp_set_comment_status',	'comment_status_change', 100, 2 );

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fosiul01Author Commented:
i am not in php for long time!!!

so it would be hard for me pick things up ..

have you look at this link

any idea why thsi one is not sending email ???
fosiul01Author Commented:
or even is there any other plugin i can use to do my task ??
fosiul01Author Commented:
i found another plugin "mail to commenter"
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.