I am using myCred on my site. Specially myCred transfer. There is an existing shortcode for this particular plugin.
[mycred_transfer pay_to=1]
where pay_to is the recipient wordpress user id. I can only manually add a user id. But so I need to manually create a shortcode for every created user and it is no go :D.
so therefore I created this function to gather user id of the current post.
// Shortcode to output custom PHP
function author_id( $atts ) {
echo $user_id = get_the_author_meta( 'ID' );
}
add_shortcode( 'my_author_id', 'author_id');
and it works for the user ID. but do not know how to replace it “1” in [mycred_transfer pay_to=1]
because if I replace “1” with a shortcode it does not work.
Thanks for ideas