Title: Adding Category Programmatically
Last modified: November 28, 2017

---

# Adding Category Programmatically

 *  Resolved [tschopo](https://wordpress.org/support/users/tschopo/)
 * (@tschopo)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/adding-category-programmatically/)
 * Hi, I have the following problem:
 * When using `wp_set_post_categories` to set the category used to notify subscribers
   about new post, the notification email doesn’t get sent. What hook does the plugin
   use to check if the category is set (I couldn’t find the code that does this)?
   And what priority? Or does it use a different method?

Viewing 1 replies (of 1 total)

 *  [Prathamesh Palve](https://wordpress.org/support/users/prathameshp/)
 * (@prathameshp)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/adding-category-programmatically/#post-9746292)
 * [@tschopo](https://wordpress.org/support/users/tschopo/)
 * The plugin stores categories in its own custom possible.
    It does not use any
   hook before sending emails as it pulls the data from its own table. So presently
   it is not possible.
 * Please let me know if you any further help.

Viewing 1 replies (of 1 total)

The topic ‘Adding Category Programmatically’ is closed to new replies.

 * ![](https://ps.w.org/email-subscribers/assets/icon-256x256.png?rev=2274172)
 * [Email Subscribers & Newsletters - Email Marketing, Post Notifications & Newsletter Plugin for WordPress](https://wordpress.org/plugins/email-subscribers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/email-subscribers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/email-subscribers/)
 * [Active Topics](https://wordpress.org/support/plugin/email-subscribers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/email-subscribers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/email-subscribers/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Prathamesh Palve](https://wordpress.org/support/users/prathameshp/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/adding-category-programmatically/#post-9746292)
 * Status: resolved