{"action":"created","issue":{"url":"https://api.github.com/repos/websharks/comment-mail/issues/149","labels_url":"https://api.github.com/repos/websharks/comment-mail/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/websharks/comment-mail/issues/149/comments","events_url":"https://api.github.com/repos/websharks/comment-mail/issues/149/events","html_url":"https://github.com/websharks/comment-mail/issues/149","id":112457485,"number":149,"title":"Turn off comment subscriptions on specific custom post types ","user":{"login":"bonest","id":15220746,"avatar_url":"https://avatars.githubusercontent.com/u/15220746?v=3","gravatar_id":"","url":"https://api.github.com/users/bonest","html_url":"https://github.com/bonest","followers_url":"https://api.github.com/users/bonest/followers","following_url":"https://api.github.com/users/bonest/following{/other_user}","gists_url":"https://api.github.com/users/bonest/gists{/gist_id}","starred_url":"https://api.github.com/users/bonest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonest/subscriptions","organizations_url":"https://api.github.com/users/bonest/orgs","repos_url":"https://api.github.com/users/bonest/repos","events_url":"https://api.github.com/users/bonest/events{/privacy}","received_events_url":"https://api.github.com/users/bonest/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/websharks/comment-mail/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/websharks/comment-mail/milestones/2","html_url":"https://github.com/websharks/comment-mail/milestones/Next%20Release","labels_url":"https://api.github.com/repos/websharks/comment-mail/milestones/2/labels","id":1210301,"number":2,"title":"Next Release","description":"Release Candidate by October 1st, 2015","creator":{"login":"raamdev","id":53005,"avatar_url":"https://avatars.githubusercontent.com/u/53005?v=3","gravatar_id":"","url":"https://api.github.com/users/raamdev","html_url":"https://github.com/raamdev","followers_url":"https://api.github.com/users/raamdev/followers","following_url":"https://api.github.com/users/raamdev/following{/other_user}","gists_url":"https://api.github.com/users/raamdev/gists{/gist_id}","starred_url":"https://api.github.com/users/raamdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raamdev/subscriptions","organizations_url":"https://api.github.com/users/raamdev/orgs","repos_url":"https://api.github.com/users/raamdev/repos","events_url":"https://api.github.com/users/raamdev/events{/privacy}","received_events_url":"https://api.github.com/users/raamdev/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":11,"state":"open","created_at":"2015-07-15T23:16:27Z","updated_at":"2015-10-21T00:24:38Z","due_on":"2015-10-07T04:00:00Z","closed_at":null},"comments":14,"created_at":"2015-10-20T20:50:21Z","updated_at":"2015-10-26T23:12:10Z","closed_at":null,"body":"Hi.\r\n\r\nIf you use Woocommerce, then Comment-mail subscription form is shown on the reviews tab.\r\nIf you use any other plugin that creates a custom post type, and uses comments you have the same problem.\r\n\r\nI have a big issue with this, and I own a PRO license, I really need a way to disable the subscription form for comments to specific post types. \r\n\r\nI really need a quick fix for this because I have a plugin that has to go live, that use comments, and it has its own notification system. And I have to put this plugin live today.. Tomorrow at the very latest. :-("},"comment":{"url":"https://api.github.com/repos/websharks/comment-mail/issues/comments/151310667","html_url":"https://github.com/websharks/comment-mail/issues/149#issuecomment-151310667","issue_url":"https://api.github.com/repos/websharks/comment-mail/issues/149","id":151310667,"user":{"login":"raamdev","id":53005,"avatar_url":"https://avatars.githubusercontent.com/u/53005?v=3","gravatar_id":"","url":"https://api.github.com/users/raamdev","html_url":"https://github.com/raamdev","followers_url":"https://api.github.com/users/raamdev/followers","following_url":"https://api.github.com/users/raamdev/following{/other_user}","gists_url":"https://api.github.com/users/raamdev/gists{/gist_id}","starred_url":"https://api.github.com/users/raamdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raamdev/subscriptions","organizations_url":"https://api.github.com/users/raamdev/orgs","repos_url":"https://api.github.com/users/raamdev/repos","events_url":"https://api.github.com/users/raamdev/events{/privacy}","received_events_url":"https://api.github.com/users/raamdev/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T23:12:10Z","updated_at":"2015-10-26T23:12:10Z","body":"@bonest You can modify `includes/classes/comment-form-after.php` and add the following code [after this line](https://github.com/websharks/comment-mail/blob/000000-dev/comment-mail/includes/classes/comment-form-after.php#L53):\r\n\r\n```php\r\nif(apply_filters(__NAMESPACE__.'_disable_subscription_options', FALSE))\r\n     return; // Disabled by filter\r\n```\r\n\r\nThen you can create an [MU-Plugin](http://codex.wordpress.org/Must_Use_Plugins) (create this file and directory: `wp-content/mu-plugins/maby-disable-comment-mail-form.php`):\r\n\r\n```php\r\n<?php\r\n/*\r\nPlugin Name: Maybe Disable Comment Mail Subscription Options\r\nDescription: Disables Comment Mail Subscription Options for certain post types\r\nAuthor: WebSharks, Inc.\r\nVersion: 1.0\r\nAuthor URI: http://www.websharks-inc.com\r\n*/\r\n\r\nadd_filter('comment_mail_disable_subscription_options', '__cm_maybe_disable_sub_opts', 10, 0);\r\n\r\nfunction __cm_maybe_disable_sub_opts() {\r\n    if(get_post_type() !== 'post') {\r\n        return TRUE; // Yes, disable Comment Mail Subscription Options\r\n    }\r\n    else {\r\n        return FALSE;\r\n    }\r\n}\r\n```\r\n\r\nWe will be adding the above filter to `includes/classes/comment-form-after.php` in the next Comment Mail release, so the above method will continue to work after the next update."}}