Here’s the repair, for good measure and anyone curious:
add_action("gform_after_submission_5", "books_promoter", 10, 4);
function books_promoter($entry, $form) {
global $post;
global $wp_query;
$post_id = get_the_ID(); // $entry['post_id'];
$post_data['status'] = get_post_meta($post_id,'status', true);
$post_data['promoter'] = get_post_meta($post_id,'promoter', true);
$status = $entry['5'];
$promoter = $entry['6'];
update_post_meta($post_id, 'books_status', $status );
update_post_meta($post_id, 'books_promoter', $promoter );
}
Related Posts:
- Custom post meta field effect on the performance on the post
- Difference between meta keys with _ and without _ [duplicate]
- Orderby meta_value only returns posts that have existing meta_key
- How to enable revisions for post meta data?
- Best way to programmatically remove a category/term from a post
- When using add_post_meta and update_post_meta, is there any way to give the individual arrays keys?
- Storing meta fields multiple times OR once with multi dimensional array?
- display specific custom fields
- passing argument to get_template_part() or a better way to code
- Is it possible to store arrays in a custom field?
- Multiple meta values for same meta_key adding on “Preview Changes” hit but not on saving or updating post
- importing data from non-wordpress mysql db
- Create meta boxes that don’t show in custom fields
- Transients vs CRON +Custom Fields: Caching Data Per Post
- Unable to save datetime custom meta field using update_post_meta() function
- Create custom field on post draft or publish?
- get_post_meta fields don’t show up on posts page
- copy attachments to another post type and change attachment url
- Cannot edit post meta fields with rest API
- Copying Custom Meta Values from existing post to a duplicate post
- Add a post meta key and value only if it does not exist on the post
- Move value of one custom field to another
- Order posts according to user defined order for meta values?
- Displaying posts with only upcoming dates according their custom field date value
- Custom fields: In what order are they saved into the DB?
- Function to change meta value in database for each post
- Get a post_id where meta_value equals something in a serialized meta_value field
- Get aggregate list of all custom fields for entire blog
- How to save a ToggleControl value in a meta field?
- using multiple meta_key and meta_value in query_posts
- How can I sort homepage by a meta value?
- Get specific custom field keys from a post and put into an array
- MySQL Query that looks for post with Custom Field, then changes Category
- ACF: How to get the full field name (meta_key) by a field key?
- Create Multiple File Upload Metabox in WordPress
- filtering custom post types via meta data drop down
- How to add a new meta key and assign timestamp to posts
- If meta key exists in get posts function otherwise create it
- Read / Watch / Listen times – meta
- How do I Implement Atomic Update of Post Metadata?
- How do I have WP_Query match posts based on search parameter OR meta fields? (rather than search parameters AND meta fields)?
- Why is my Custom Meta Box Field Inputs NOT saving?
- Get registered custom fields or post meta even if empty
- Displaying multiple URLs as custom field values
- get_posts in meta box dropdown not showing latest posts
- Limits, not all post are showen when querying for posts by view count
- Display Custom Meta Box Field Only If Value is Present
- Ordering posts by custom field named “date” in backend
- Unique meta_key with array value vs repeated meta_key with single values
- Allow only one post with specific meta value
- How to validate select field in post meta?
- How to display childrens custom fields?
- how to display custom fields of post on a web page
- How do I query the title (or handle?) of post meta fieldset (created with Simple Fields Plugin)
- How to fill custom fields with brackets in their key with add_post_meta()?
- Looping inside block return
- change order of images attached to post
- how can I show name and value of Custom Fields together?
- Best way to achieve multiple links in a post title
- How can I add/update post meta in a admin menu page?
- Custom Field & Gravity Forms [closed]
- Get author total post votes from post meta
- custom filed from post in the side bar
- wordpress multi user question
- How to display custom fields in hestia theme
- Adding Custom Metadata to my Archive/Posts page
- How to improve my non-unique metadata MySQL entries?
- How to speed up post list slowed by update_meta_cache()?
- WordPress Blocks, setAttributes not saving
- Custom Fields Not Showing (ACF not installed)
- SQL query to change the value of a Custom Field
- Custom meta POST request fired twice when updating a post in Gutenberg
- Add custom field information to source meta data
- How do I update custom field post meta in frontend post template?
- Update custom field on page specific to logged in user
- How to Find List of Available Custom Fields for Theme?
- Create Meta boxes dynamically
- Custom Fields Not Working In Footer
- ACF plugin and field update
- Delete custom meta
- Check if value exists before saving
- Get meta value when the page is a blog archive
- Search one custom field?
- Can’t save meta field value if the title not set
- Adding custom fields to images
- How to save dynamically generated value in post type?
- wordpress simple post multi rating with post_meta and user_meta
- wp_postmeta are updated for only one page
- how to show this part only in the single post page?
- Display meta data from a custom field within plugin Category Grid View Gallery
- Custom fields / meta box output
- If post custom meta data is not set, show normal state
- Colecting values from custom field checkboxes and displaying them in the post
- Build Array from Input Fields question
- custom field with links
- How can i put a custom field inside this php
- How to add new Metadata options (Date, Author, etc.) for Posts?
- WP Query Args – search by meta_key or title
- Saving multiple custom meta box fields
- Search for meta_query does not return any result if combined with title