I have the following snippet of code that has been working for several years. Recently updated GravityForms and now it seems like the gform_get_meta function is not returning anything.
add_action( 'gform_after_submission', 'set_post_content', 10, 2 );
function set_post_content( $entry, $form ) {
//if the Advanced Post Creation add-on is used, more than one post may be created for a form submission
//the post ids are stored as an array in the entry meta
$created_posts = gform_get_meta( $entry['id'], 'gravityformsadvancedpostcreation_post_id' );
foreach ( $created_posts as $objpost )
{
$post_id = $objpost['post_id'];
$post = get_post( $post_id );
I cannot figure out why it is returning empty. When I use phpAdmin to look at the meta table, I can see the records in there.
Thanks,
Westley
That did the trick. I just wish somewhere in the documentation I had seen a reference to that or at least the fact that the Advanced Post Creation Add-on switched to asynchronous processing.