WordPress.org

Ready to get started?Download WordPress

Forums

update post meta not working in hook (2 posts)

  1. adeens
    Member
    Posted 2 years ago #

    Hi all,

    I have a hook to do a few things when a custom post is published. The hook takes my new post and turns it into a child category in custom taxonomy 'product_category'. That part works:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    BUT _app_cat_id value is not being updated. It's just being added to the db with no value. When I var_dump $post_ID and $new_term_id (before the update post meta line) they both have the correct values, and I added 'blue' just to see if it was a variable issue but the db meta value is still blank. What's preventing it from working?

  2. adeens
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic