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?
- Display Authors Comments on Profile Page
- 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?
- feed links for custom post type pages
- Sanitizing post content for use in an email
- Admin to user notices – best practices?
- Seperating custom post type comments from regular blog posts comments
- 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
- Reply By Email to comment notifications
- Create another comment system for CPT
- 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
- custom comments form for custom post type
- 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
- How to insert data into meta box from another plugin?
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Generate new post from email
- 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)
- comments hooks on custom post type
- custom comment fields on CPT
- unapprove comments on custom post type
- Enable comments for post when comments meta box removed
- Custom post type updated to support comments, yet comments don’t appear
- Not receiving any e-mails after new comment
- Turn off comments for given CPT checkbox?
- send email to all registered users when post expires
- Comment notification not working
- Author profile comments system
- Custom post type: can’t enable comments by default
- 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?