Gravity Forms - Update Post
Updating a post deactivates comments (6 posts)

  1. hilj
    Posted 3 years ago #


    Whenever I update a post the comments are deactivated. Updating the post from the backend keeps the comments on as suposed to.

    It is a custom post type and I'm using the Gravity Forms custom post type plugin to enable this.

    Hope somebody can help me :) Thanks!


  2. MarceFX
    Posted 3 years ago #


    Same issue :-/ Any ideas?


  3. MarceFX
    Posted 3 years ago #

    Found it! So far, this fix has work for me:

    mysql_query("UPDATE wp_posts SET comment_status = REPLACE (comment_status, 'closed', 'open') WHERE post_status = 'publish' AND post_type = 'product';");

    Add it to the end of the end of gravityforms-update-post.php


  4. hilj
    Posted 3 years ago #

    Very nice! Thank you :)

  5. Puggy
    Posted 2 years ago #

    I needed to get this done as well, but just running that SQL all the time didn't seem like a great solution so I dug a little and found Gravity Forms' Gform_post_data hook. Using this, here's how I fixed it:

    add_filter("gform_post_data", "open_comments", 10, 3);
    function open_comments($post_data, $form, $entry){
        $post_data["comment_status"] = "open";
        return $post_data;

    This modifies the comment status as the form is submitted, without any extra SQL queries. You can also modify this to your liking to be more selective about which post types have comments open, or whatever extra logic you need. This can also be placed in your functions.php rather than modifying the plugin, if you prefer.

  6. myhero
    Posted 2 years ago #

    Hi guys this seems to be the only active thread here.

    Are you the version available here or this updated plugin:

    Update on Github (this is a file download link)

    I would like to use the update but I cannot get it to work, and do not know if I'm missing something in terms of setting it up.

    How were you able to get it working?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gravity Forms - Update Post
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.