{"id":95136,"date":"2004-09-26T02:48:42","date_gmt":"2004-09-26T02:48:42","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/code-change-request\/"},"modified":"2017-02-07T18:34:55","modified_gmt":"2017-02-07T18:34:55","slug":"code-change-request","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/code-change-request\/","title":{"rendered":"Code change request"},"content":{"rendered":"<p>I&#8217;ve written about this to Matt but haven&#8217;t heard anything back and so, I&#8217;m posting this here as well :p Basically, the problem is this. The WP code calls all hooked actions for &#8216;comment_post&#8217; <em>after<\/em> it has already sent out an e-mail confirming the posting of the comment or the holding of the comment for moderation based on the internal spam checks. However, if you have a anti-spam plugin, you&#8217;ll be hooking into &#8216;comment_post&#8217; in your plugin but even if your plugin holds the comment for moderation based on your logic, the cofirmation e-mail has already gone out.<br \/>\nSo what I suggested was that WP core code holds or approves the comment and then calls the hooked actions for &#8216;comment_post&#8217; and <em>after<\/em> that check the status of the comment again and then send out the confirmation of posting or held for moderation e-mail out. BTW, the code I&#8217;m talking about is in wp-comments-post.php. What do you think?<\/p>\n","protected":false},"template":"","class_list":["post-95136","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/95136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/95136\/revisions"}],"predecessor-version":[{"id":8749841,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/95136\/revisions\/8749841"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=95136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}