For comment approved, you can review this question
For comment submitted, you can hook into the comment_post
hook, like
function show_message_function( $comment_ID, $comment_approved ) {
if( 0 === $comment_approved ){
//function logic goes here
}
}
add_action( 'comment_post', 'show_message_function', 10, 2 );
Code copied from https://developer.wordpress.org/reference/hooks/comment_post/
Related Posts:
- How can the recipients and content for comment email notifications on a custom post type be changed?
- Add comments meta fields to comments metabox on post edit screen
- changing default comment form arguments [duplicate]
- Notify admin on new submit
- What functions does WordPress use for filtering / sanitizing comments?
- comment_notification_text filter for custom post type
- duplicate comment section functionality and call it something else for custom post types
- BCC email to subscribers
- Comments not enabled for custom post types
- Error 403 when posting comments to a custom post type from a different page
- Why are the comments disabled by default on my custom_post_types?
- Why are comments and trackbacks still getting through for custom post types?
- How to change the email notification recipient (user) for new comments?
- List all posts commented by current user
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- Custom Comment Types
- modify all posts of a category to “no comments allowed”
- Custom comment status possible?
- Sanitizing post content for use in an email
- Admin to user notices – best practices?
- Custom post type without editor or revisions – Notify on update?
- How to auto send email when publishing a custom post type?
- Exclude post_type from admin comments_list
- Recent comments on author page?
- wp_query and comment_parent – select only posts with top level comments
- Comment moderation on custom post types
- If new comment posted in custom post – send notification to custom email from custom field
- Automatically check “Allow comments” for custom post type [duplicate]
- Disable Admin account being emailed for comment notification
- Post Via Email to a Custom Post Type
- WordPress comments email notification for authors
- Show admin help message across custom post type parent and child posts
- How to add notification in the sidebar of the administration panel when a Custom post type is created? [duplicate]
- How could I create a ‘private comments’ section on a custom post type?
- Disable comments from showing up public for Custom Post Type
- Send Notifications to All Admins
- Custom Post Type loops and Disqus
- “Allow Comments” box cannot be checked
- Sending an email when a CPT is saved/updated (NOT when it’s created)
- Separate comment section for post type in dashboard
- How to add extra input fields to CPT’s comment form?
- Count all comments of a custom post type
- custom comments on specific post type
- Insert data on comment post
- Email friend for each Custom Post Type posts on a page
- Send email button in custom post type backend
- Ajax Check Post Status
- get_comments not working on custom post types
- Custom Post Type Set Comments ON by default without show METABOX
- WordPress comments_open for specific user role or post type
- get_post_meta returning no value in custom post type alert email
- Send notifications to custom post author when custom post is edited
- Add custom field in comments form
- Adding the_content() in custom template email
- Send notification to the admin when new custom post is submitted
- comment_form() not showing on custom post type
- Convert comments to Custom Post Type
- How to assign classes to all elements?
- Notify comment author upon reply
- Delete “Post Published. View Post” for custom post type
- Send a conditional email notification when a custom field value changes in Post Type
- get comments by current user inside page template
- Adding guestbook to my wordpress site
- User-submitted reviews of different custom post types
- Check if user has comment on current post
- Comment form on custom page template
- Enable comments on custom page type – option not showing in “customize” for theme
- Allow anonymous comments just in a custom post type
- Send post changes to set email addresses (not users or subscribers)
- custom comment fields on CPT
- unapprove comments on custom post type
- Enable comments for post when comments meta box removed
- Get the latest comment from a custom post type where depth = 1?
- Extending post by email
- See if the email exists or not
- How to add comments to my custom post type but hide it from default WordPress Comments section?
- How to change the comments form title based on post type
- How to display an admin-notice after custom post type edit modification
- CPT email notification including only new value custom fields
- Comments on posts with new custom post type redirected to another post
- Send email to author of the post when the custom post status changes to published
- Send mail to author when custom post type is saved
- How to check if a new private custom post type is created?
- How to create a discussion post when a custom post is created?
- how to display notifications in the wordpress menu when a new post is published
- Custom post type updated to support comments, yet comments don’t appear
- Turn off comments for given CPT checkbox?
- Comment notification not working
- Author profile comments system
- Comment moderation with disqus comments
- Subscribe to a post’s comments without posting a comment yourself
- CPT Metabox with email notification
- strange conditional tag behaviour [duplicate]
- add comments custom fields after user is logged in
- Emailing Authors only when a CUSTOM POST TYPE post is published- not when edited later [duplicate]
- Comments are not working on Custom Post Type
- How to create a job post by email parsing? [closed]
- Send email on creation of custom post type and use get_post_meta()
- Comments not working (error not allowed) on posts with custom post status
- How do I add the “orange counter” next to a Custom Post Type?