Assume I created a new post type 'product'. Is there a way to perform a function (user created) when this new 'product' post has been created?

3 s
3

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

Leave a Reply

Your email address will not be published. Required fields are marked *