• Resolved wforte

    (@wforte)


    Hi,

    I’d like to know about the available hooks to customise the plugin. Are there some way to automatize creation and edition of posts (requests)? I have a task manager (Redmine) to receive the requests of my customers. In Redmine, I manage the tasks to my dev team. I’d like to make two hooks/triggers:

    1. Create a request in WP (Post Type of your plugin) when I create a task in Redmine.

    2. Change the status in WP when I change the status in Redmine.

    Is this possible?

Viewing 1 replies (of 1 total)
  • Hey,

    Yes, you could do that. You can run the following method:

    JCK_SFR_Factory::create( $args )

    Where $args is:

    $args = array(
    	'title'       => null,
    	'description' => null,
    	'votes'       => 1,
    	'user'        => false,
    	'taxonomies'  => false,
    );
    

    You could then hook into the jck_sfr_post_created action which passes the new post ID and use that to change the post status:

    $feature_request = new JCK_SFR_Feature_Request( $id );
    $feature_request->set_status( 'completed', true );
    

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Hooks in premium plugin’ is closed to new replies.