Created
December 17, 2021 17:03
-
-
Save greenhornet79/1b13fa72f1f12dc059bf8354d6e24f55 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 | |
add_filter( 'lp_gift_subs_details_array', 'zeen_save_gift_giver_address' ); | |
function zeen_save_gift_giver_address( $data ) { | |
if ( isset( $_POST['gift_giver_address'] ) ) { | |
$data['gift_giver_address'] = sanitize_text_field( $_POST['gift_giver_address'] ); | |
} | |
if ( isset( $_POST['gift_giver_city'] ) ) { | |
$data['gift_giver_city'] = sanitize_text_field( $_POST['gift_giver_city'] ); | |
} | |
if ( isset( $_POST['gift_giver_state'] ) ) { | |
$data['gift_giver_state'] = sanitize_text_field( $_POST['gift_giver_state'] ); | |
} | |
if ( isset( $_POST['gift_giver_zip'] ) ) { | |
$data['gift_giver_zip'] = sanitize_text_field( $_POST['gift_giver_zip'] ); | |
} | |
if ( isset( $_POST['gift_giver_country'] ) ) { | |
$data['gift_giver_country'] = sanitize_text_field( $_POST['gift_giver_country'] ); | |
} | |
return $data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment