Advertisement
verygoodplugins

Untitled

Aug 14th, 2019
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. function trigger_wpf_nationbuilder( $entry, $form ) {
  2.  
  3.     if ( ! function_exists( 'wp_fusion' ) ) {
  4.         return;
  5.     }
  6.  
  7.     $feeds = wp_fusion()->integrations->{'gravity-forms'}->get_feeds( $entry['form_id'] );
  8.  
  9.     foreach ( $feeds as $feed ) {
  10.  
  11.         if ( $feed['addon_slug'] == 'wpfgforms' ) {
  12.  
  13.             wp_fusion()->integrations->{'gravity-forms'}->process_feed( $feed, $entry, $form );
  14.  
  15.         }
  16.  
  17.     }
  18.  
  19. }
  20.  
  21. add_action( 'gform_post_add_entry', 'trigger_wpf_nationbuilder', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement