Function added to hook “new_to_publish” not executing – custom plugin


I was creating a custom plugin which was to send certain emails based on the content/category of a post, but whilst trying to do that, I ran into some problems just getting a basic email sent out. Am I hooking on to the wrong function here? When I publish a post, nothing happens.

* Plugin Name: Conditional Emailing
* Description: Sends emails based on categories.
* Version: 1.0
* Author: Ceds

add_action( 'new_to_publish', 'conditional_email', 10, 0);

function conditional_email() {


What am I doing wrong here?

, , , , Ceds 7 years 2016-12-14T06:59:44-05:00 0 Answers 85 views 0

Leave an answer