Hi There.
I may need to tweak Gravity Forms a touch to make an insert into wp_postmeta occur before a plugin activates. I'll explain...
We have a site which creates custom posts using Gravity Forms.
Using BuddyPress Group Subscription, users are able to sign up to groups & recieve these posts via email.
Using BuddyPress Group Subscription, users can choose a digest of posts or see all posts.
The users need to be able to read the entire post when All Email is selected.
Under normal circumstances, user hits the Submit button on our Gravity Form, the post is then added to the activity stream, & the email content is sent out.
Normally, when the addition is made to the Activity Stream, the post_title & post_content is used, all located in wp_posts.
I have written a function that pulls the relevant data from wp_posts & wp_postmeta to return a string that contains all the information required.
The problem is that, when the post is added to the Activity Stream at that point wp_post contains the correct data, but wp_postmeta does not have the custom form data added yet.
I tested this by decrementing the post_id by 1 when my function was called ( which is called 1 line prior to adding the post to activity stream) & the function works perfectly.
So in an nutshell what's happening is:
1) User presses submit
2) data is inserted into wp_posts
3) data is added to Activity Stream - (Data for the email functionality)
4) data is added to wp_postmeta
Is there a way I can make Gravity Forms do 4) before the Group Email Subscription Plugin does 3)?
Alternatively, is there a way I can make Gravity Forms complete its inserts before another plugin /function even starts? I'd rather take a performance hit of a few seconds on the Email side so that Gravity Forms can work.
All advice would be appreciated!