if(strpos($query, '%get_email%') !== false){
$query = str_replace('%get_email%', get_the_author_meta( 'user_email' ), $query);
}
Okay so am trying to make a MySQL query and in the plugin I am trying to add a shortcode %get_email%
but anyway its not returning any email in the actual query.
Like
select* from tablename where email="%get_email%";
Any idea on how to do that?
Here what is working for id –
if(strpos($query, '%CURRENT_USER_ID%') !== false){
$query = str_replace('%CURRENT_USER_ID%', get_current_user_id(), $query);
}