Advertisement
verygoodplugins

Untitled

Apr 8th, 2020
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. if ( ! isset( $data['optin_status'] ) ) {
  2.     $data['optin_status'] = wp_fusion()->settings->get( 'gh_default_status', 2 );
  3. }
  4.  
  5. $contact = new \Groundhogg\Contact( $data );
  6.  
  7. unset( $data['first_name'] );
  8. unset( $data['last_name'] );
  9. unset( $data['email'] );
  10.  
  11. // Update custom fields
  12.  
  13. foreach ( $data as $key => $value ) {
  14.  
  15.     $contact->update_meta( $key, $value );
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement