Created
December 5, 2019 02:17
-
-
Save spivurno/35e169a197dee221cca5473d1d642cf3 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Map GF Checkbox Field to ACF Checkbox Field (User Meta) | |
* http://graivtywiz.com/ | |
*/ | |
add_filter( 'gform_user_registration_meta_value', function( $value, $meta_key ) { | |
// Update "checkboxes" to your custom field's name. | |
if( $meta_key === 'checkboxes' ) { | |
$value = array_map( 'trim', explode( ',', $value ) ); | |
} | |
return $value; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👉 This Gist has been migrated to the Gravity Wiz Snippet Library:
https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-checkbox-to-acf.php