Title: Notice: Undefined variable: post_id
Last modified: November 20, 2022

---

# Notice: Undefined variable: post_id

 *  [Fetch Designs](https://wordpress.org/support/users/fetchdesigns/)
 * (@fetchdesigns)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/notice-undefined-variable-post_id/)
 * I’m seeing the following notice being thrown during different actions in the 
   admin seemingly unrelated to your plugin.
 * `Notice: Undefined variable: post_id in /var/www/html/wp-content/plugins/wp-notification-
   bell/admin/admin.php on line 426`
 * This last time this was thrown I was in the admin syncing fields with the Advanced
   Custom Fields plugin although have seen it while doing other core functions.
 * The logic is being called within the `save_post` action and it’s returning the
   $poist_id which doesn’t exist. In this case, the `save_post` action doesn’t use
   a return value so I suspect these `return $post_id;` lines within this function
   just need to be updated to return void….`return;` to solve the issue.
    -  This topic was modified 3 years, 6 months ago by [Fetch Designs](https://wordpress.org/support/users/fetchdesigns/).
      Reason: Added possible solution

The topic ‘Notice: Undefined variable: post_id’ is closed to new replies.

 * ![](https://ps.w.org/wp-notification-bell/assets/icon-256x256.png?rev=2439614)
 * [WP Notification Bell](https://wordpress.org/plugins/wp-notification-bell/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-notification-bell/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-notification-bell/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-notification-bell/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-notification-bell/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Fetch Designs](https://wordpress.org/support/users/fetchdesigns/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/notice-undefined-variable-post_id/)
 * Status: not resolved