Created
November 1, 2021 11:41
-
-
Save ahartzog/8f100b32031960c5581434b0ad6f6b44 to your computer and use it in GitHub Desktop.
Quick gist of extra line for Jack
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
/** | |
* Sync additional meta after user profile update | |
* | |
* @access public | |
* @return void | |
*/ | |
public function after_update_user( $action, $entry, $form ) { | |
if (class_exists("FrmRegEntryHelper")) { | |
$user_id_field = FrmRegEntryHelper::get_user_id_field_for_form($entry->form_id); | |
if ($user_id_field && isset($entry->metas[$user_id_field]) && $entry->metas[$user_id_field]) { | |
wp_fusion()->user->push_user_meta($entry->metas[$user_id_field]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment