Last active
December 17, 2021 17:06
-
-
Save greenhornet79/2a72504d84e7099131d84d42a3ef5916 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( 'leaky_paywall_simplecirc_gift_giver_data', 'zeen_add_gift_giver_data_to_simplecirc', 10, 2 ); | |
function zeen_add_gift_giver_data_to_simplecirc( $data, $gift_details ) { | |
if ( isset( $gift_details['gift_giver_address'])) { | |
$data['address_1'] = $gift_details['gift_giver_address']; | |
} | |
if ( isset( $gift_details['gift_giver_city'])) { | |
$data['city'] = $gift_details['gift_giver_city']; | |
} | |
if ( isset( $gift_details['gift_giver_state'])) { | |
$data['state'] = $gift_details['gift_giver_state']; | |
} | |
if ( isset( $gift_details['gift_giver_zip'])) { | |
$data['zipcode'] = $gift_details['gift_giver_zip']; | |
} | |
if ( isset( $gift_details['gift_giver_country'])) { | |
$data['country'] = $gift_details['gift_giver_country']; | |
} | |
return $data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment