Created
          June 3, 2021 18:43 
        
      - 
      
- 
        Save rafaehlers/8b1ed11872fa217d0d0d9f7bfe0e812a to your computer and use it in GitHub Desktop. 
    Trigger Zapier feeds on your form when editing an entry in GravityView
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php // DO NOT COPY THIS LINE | |
| add_action( 'gravityview/edit_entry/after_update', 'gravityview_trigger_zapier_feed', 10, 3 ); | |
| function gravityview_trigger_zapier_feed( $form = array(), $entry_id = array(), $object ) { | |
| if ( 100 !== (int) $form['id'] ) { // replace 100 with your form ID | |
| return; | |
| } | |
| add_filter( 'gform_is_feed_asynchronous', '__return_false', 1294873 ); | |
| $Zapier = GF_Zapier::get_instance(); | |
| $Zapier->maybe_process_feed( $object->entry, $form ); | |
| remove_filter( 'gform_is_feed_asynchronous', '__return_false', 1294873 ); | |
| } | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment