function add_profitwell_script_to_footer() { $token = "58deab0c0004eb933c6ecd3eb047cea0"; $start_options = "{}"; $current_user = wp_get_current_user(); if ($current_user->exists()) { $start_options = "{user_email: '{$current_user->user_email}'}"; } echo " "; } add_action('wp_footer', 'add_profitwell_script_to_footer');