The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

update post meta not working in hook (2 posts)

  1. adeens
    Posted 5 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
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic