Last active
September 28, 2023 13:40
-
-
Save PechenkiUA/b8679ee2570e54cd9673d9a4f47d25b5 to your computer and use it in GitHub Desktop.
User data Telsender
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
/** | |
* @param $list | |
* @param $order_id | |
* @return mixed | |
*/ | |
function user_data_function($list, $order_id){ | |
$user_id = get_current_user_id(); | |
if ($user_id){ | |
$list['{user_last_name}'] = get_user_meta( $user_id,'last_name',true); | |
$list['{user_nickname}'] = get_user_meta( $user_id,'nickname',true); | |
$list['{user_first_name}'] = get_user_meta( $user_id,'first_name',true); | |
} | |
return $list; | |
} | |
add_filter('tscf_filter_codetemplate', 'user_data_function', 20, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment