HELP: Admin always gets Listing Confirmation emails instead of the user.
Hi all,
Now that my site is active and starting to get some use I've noticed that whenever somebody claims their listing the site thinks that the Admin is claiming the listing and not the user. *see pic below*
Screen Shot 2013-07-26 at 12.49.29 PM.png
Then when I approve the Listing, the confirmation email that is meant to be sent to the user who claimed the listing, is actually sent to the admin. Weird.
Any ideas on what could be triggering this?
I should note that I do have a heavily modified theme but the code in emails.php has not been changed (from memory)
PHP Code:
function va_send_approved_notification( $post ) { $recipient = get_user_by( 'id', $post->post_author );
$content = '';
$content .= html( 'p', sprintf( __( 'Hello %s,', APP_TD ), $recipient->display_name ) );
$content .= html( 'p', sprintf( __( 'Your "%s" listing has been approved.', APP_TD ), html_link( get_permalink( $post ), $post->post_title ) ) );
$subject = sprintf( __( '[%s] Listing Approved: "%s"', APP_TD ), get_bloginfo( 'name' ), $post->post_title );
va_send_email( $recipient->user_email, $subject, $content );}
Would appreciate any advise.
Many thanks,
Daniel
Last edited by margas; July 25th, 2013 at 10:54 PM.
Reason: Change title.