Calling a Function After New Post Creation for a WordPress Custom Post Type?
In functions.php: function mynewproduct(){ myfunction(); } add_action( ‘new_product’, ‘mynewproduct’ ); For more and the official documentation, refer here: http://codex.wordpress.org/Post_Status_Transitions