• Resolved lucdouve

    (@lucdouve)


    Hi there,

    I have contact form, the data from there needs to go to a post.
    The post needs to be directly published, however it stays on ‘draft’.
    I already added this:
    ============
    add_action( ‘cf7_2_post_status_insta’, ‘publish_new_insta’,10,3);
    function publish_by_default($status, $ckf7_key, $submitted_data){
    return ‘publish’;
    }
    ============
    to the functions.php file in the theme section. Am i missing something?

Viewing 1 replies (of 1 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    sure, your function name needs to mactch. You’re calling ‘publish_new_insta’ in your hook but the function is called publish_by_default… make sure they are the same.

    I realise the helper code is wrong, which induced you to the simple error. I will fix this in the next release.

Viewing 1 replies (of 1 total)
  • The topic ‘From draft to publish’ is closed to new replies.