Created
April 29, 2020 09:20
-
-
Save verygoodplugins/75aa92920fef298644bc4e50c1f34647 to your computer and use it in GitHub Desktop.
Conditionally disable WP Fusion from syncing new contacts to your CRM based on a user_meta field value
This file contains 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 | |
function skip_contact_creation( $user_meta, $user_id ) { | |
if ( isset( $user_meta['receive_press_releases'] ) && true != $user_meta['receive_press_releases'] ) { | |
$user_meta = null; | |
} | |
return $user_meta; | |
} | |
add_filter( 'wpf_user_register', 'skip_contact_creation', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment