Forum Replies Created
-
AuthorPosts
-
gumateraParticipant
Find the solution below. Tested and verified!
///////////////////////////////////////
add_filter(‘filter_stamper_text_after_replacing_tags’, ‘customize_text_to_stamp’, 10, 2);
function customize_text_to_stamp ($text_to_stamp, $additional_params)
{$current_user = wp_get_current_user();
// Which you want to dispaly you can set below type
// $current_user->first_name //First Name of login User
// $current_user->last_name //Last Name of login User
// $current_user->display_name // Name of login User
// $current_user->user_email // Email$text_to_stamp .= “Some text here” . $current_user->user_login . “some text here”;
return $text_to_stamp;
}gumateraParticipantI sent a new reply, but I dont see it here…
gumateraParticipantThanks for your support!
Yes, I am using the custom button. But I couldn’t find any variable available to stamp the Current-Username.
{Customer name} does not return current-username, right?
What I want is: From the Download Button, a logged-in user will download a PDF file with his username and email displayed in file’s footer in a sentence like “Licensed to gumatera – guma@gmail.com by Company.”
I dont know how to get the current username and use it in the wp filter (article link above) as $text_to_stamp .= “Licensed to %current_username% – %current_user_email% by Company.”;
I mean, I dont know the query to get the current user name and HOW to insert the username and email in this sentence to be displayed…
gumateraParticipantFrom WP.
gumateraParticipantOh, I forgot to say the problem occurs even if “Use UTF-8 Font” option is checked.
gumateraParticipantHi there, I have the same problem.
In plugin Settings > Text to Stamp, the original text “Versão gerada para” is stamped as “Versão gerada para”.
On my website all PDFs are generated by the button [stamper_download_button_for_wp_user]
The problem occurs even if “Use UTF-8 Font” option is checked.
- This reply was modified 3 years, 3 months ago by gumatera.
-
AuthorPosts