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
# token.pickle stores the user's credentials from previously successful logins | |
if os.path.exists('token.pickle'): | |
print('Loading Credentials From File...') | |
with open('token.pickle', 'rb') as token: | |
credentials = pickle.load(token) | |
# Google's Request | |
from google.auth.transport.requests import Request |
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
function edd_paytrail_address_fields() { | |
$logged_in = is_user_logged_in(); | |
if( $logged_in ) { | |
$user_address = get_user_meta( get_current_user_id(), '_edd_user_address', true ); | |
} | |
$line1 = $logged_in && ! empty( $user_address['line1'] ) ? $user_address['line1'] : ''; | |
$city = $logged_in && ! empty( $user_address['city'] ) ? $user_address['city'] : ''; | |
$zip = $logged_in && ! empty( $user_address['zip'] ) ? $user_address['zip'] : ''; |