A hacky way round just for this situation is to just to get the latest create post. Not ideal but works as long no one creates an order within milliseconds of each other.
public function order_confirmation( $confirmation, $form, $entry, $ajax ) {
// get latest created order
$order = get_posts([
'post_type' => 'purchase-order',
'numberposts' => 1
]);
// update redirect to order
$confirmation = array( 'redirect' => get_permalink($order[0]->ID) );
// return confirmation
return $confirmation;
}
Related Posts:
- gravity forms : use previous dropdown choice as variable in gform_pre_render? [closed]
- Gravity form to submit to third party application
- outlook calendar event from form post [closed]
- Update post using gravity forms 2019 solution
- Gravity forms – Can I have multiple custom spinners? [closed]
- gform_after_submission add list of form titles after the post content [closed]
- How to make entries of Gravity Forms available in the public front-end? [closed]
- Creating custom array keys on gravity forms entry
- Pre-populate Gravity Forms Field with Custom Post Type
- gravity forms file upload field
- Form Object Gravity Forms [closed]
- Restricting product quantity field to numbers only in Gravity Forms
- Why does using conditional logic in gravity forms break the form when placed using php
- Gravity Forms Webhooks [closed]
- Is there a way to display poll question results in Gravity forms before submitting the form?
- Populate email field is wp-signup.php
- Submit a Gravity Form as other user [closed]
- magnific popup + gravity form query string not passing
- How to get the total donations made by a user – Gravity Forms? [closed]
- Gravity form multi-select issue on ios [closed]
- Pass MD5 value to prepopulate field
- Gravity Forms Upload each entry to Unique Folders
- Gravity Forms redirect based on conditions
- Multi-image upload doesn’t work [closed]
- Gravity forms and wp_update_post [closed]
- Value of Query string [closed]
- Gravity Forms non-empty Total field values not submitted [closed]
- Pass created post id from gform_after_submission action to gform_confirmation filter?
- Gravity Forms: tracking form [closed]
- Gravity Forum Custom Field Check box attribution
- Gravity Forms custom Field entry
- How to add custom input via PHP into every Gravity Form? [closed]
- Getting values in gform_confirmation for Gravity Forms [closed]
- Is there a way to call on just the content of a Page without actually using that Page? [closed]
- Gravity Forms, how to link form to amember pro signup [closed]
- Gravity Forms data to SOAP Service says Could not connect to host
- gravity form merge multiple records with the same id
- gravityforms chart
- Gravity Form Repeater File/Media Upload Not Working
- Gravity Form – notification if some values not match
- Gravity Forms Multiple Dates Filled by 1st Date
- WordPress – Gravityforms https:// is not a valid url
- Add (populate) multiple dynamic fields trough a url query
- Am i doing something wrong by getting plugins from github repos?
- Update post’s custom fields after workflow step approved or rejected in gravity flow
- Problem with Gravity Forms – multistep form
- Fill drop-down box with other text field entries
- My Gravity forms creates a Woocommerce order but I want to exclude a certain form
- Gravity Forms and regex – Doesn’t seem to validate
- Foreach loop through Gravity Forms entries
- Gravity form Multiple receiver with different message
- Use gform_pre_render / Google distance Matrix to calculate distance on page 2 of form based on input on page1
- Gravity Forms – RMA Count
- Gravity Forms + Post Fields + Divi Load From Library
- Gravity Forms Create Variable For Users Without Pre-existing Entries
- Paypal not converting currency when using Gravity Forms on WordPress
- gform_pre_render Dropdown populated with roles [closed]
- Gravity Forms field ID $entry not working
- Gravity Forms ExactTarget Add-on Plugin: Nothing happens after step 2 when creating a new feed [closed]
- Prevent threading in emails from gravity forms [closed]
- GravityForms inside Gantry4 won’t display [closed]
- Gravity Forms: Limit entries by number of times of a certain field value and date
- Restricting text field to numbers only in Gravity Forms [closed]
- How do I add custom fields to Gravity Forms? [closed]
- How to call post update addon after payment in payment gateway gravity form plugin?
- How to deactivate gravityforms WordPress plugin
- How do I show data from gravity forms in my template? [closed]
- Delete the original big size image after upload and leave only 3 images crunched by media gallery
- get_page_by_title() not returning anything [closed]
- GravityForm: Populate Dropdown with custom post type [closed]
- Comment form connection to Gravity Forms
- How can I trigger actions manually?
- Having a Function Inside of the Loop
- Shortcodes — Using add_action, add_filter in the shortcode
- Add PDF to ACF image field from file url
- How to remove medium size class in gravity form for input tag?
- Migrating hosts, 500 errors and plugin issues
- trying to determine if meta value exists for user and if not auto submit gravity form to redirect
- Gravity forms – get shortcode attribute from post content
- Gravity Forms parameters return 1
- How to get a custom entry field label with Gravity Forms?
- populating a form field with output from a custom plugin function
- Logic on a Gravity Forms redirect [closed]
- Gravity forms multiple posts generated by one form [closed]
- Gravity Forms Anchor only on Front Page?
- need correction with a snippet in functions.php [closed]
- Doing Math with Gravity Forms List
- Confuse between forms and tables
- Store GravityForm data in phpmyadmin (mysql)
- WordPress post not executing shortcode until updated
- Dynamically add a unique number/identifier at the end of post titles
- Get value of pre-populated Gravity forms field as variable in my function
- Redirect users in first login to a dynamic link
- GravityForms to Salesforce API, problem with people who leave out company [closed]
- Code working in functions.php but not pluign for gavity forms
- Is it possible to set different payment gateway on each Gravity Forms form? [closed]
- Transparent Overlay for Gravity Forms Ajax Spinner
- Gravity form with paypal adon should return custom receipt
- Gravity Forms and Gravity View Permissions
- Display months on a drop down calendar as TEXT instead of Numbers