No notification of proposal sent to the project creator
There are No notifications of proposal sent to the project Creator.
I think there is a problem with this code
\'%5$s\.
Because I received the mail for the candidate this when a make a proposal: "Hello AXL, your poposal for
https://faismatache.ca/faire-une-proposition/, was sent to''
I'm not sure is good.
And i received nothing (no mail, no notification) for the employer.
Can you help me with the bug?
### new Proposals
$proposal = hrb_get_proposal( $proposal );
$candidate = get_user_by( 'id', $proposal->user_id );
$employer = get_user_by( 'id', $proposal->project->post_author );
$project_link = html_link( get_permalink( $proposal->project->ID ), $proposal->project->post_title );
$proposal_link = html_link( esc_url( get_the_hrb_proposal_url( $proposal ) ), __( 'proposal', APP_TD ) );
### notify candidate
$subject_message = sprintf( __( 'Your %1$s for - %2$s - was sent to \'%3$s\'', APP_TD ), $proposal_link, $project_link, $employer->display_name );
$content = sprintf(
__( 'Hello %2$s,%1$s
your %3$s for %4$s, was sent to \'%5$s\'.', APP_TD ), "\r\n\r\n", $candidate->display_name, $proposal_link, $project_link, $employer->display_name
);
$participant = array(
'recipient' => $candidate->ID,
'message' => $subject_message,
'send_mail' => array(
'content' => wpautop( $content ),
),
'meta' => array(
'subject' => wp_strip_all_tags( $subject_message ),
'project_id' => $proposal->project->ID,
'action' => esc_url( get_the_hrb_proposal_url( $proposal ) ),
),
);
appthemes_send_notification( $participant['recipient'], $participant['message'], 'notification', $participant['meta'], array( 'send_mail' => $participant['send_mail'] ) );
### notify employer
$subject_message = sprintf( __( 'User \'%1$s\' has just sent you a %2$s for - %3$s -', APP_TD ), $candidate->display_name, $proposal_link, $project_link );
$content = sprintf(
__( 'Hello %2$s,%1$s
user %3$s has just sent you a %4$s for %5$s.', APP_TD ), "\r\n\r\n", $employer->display_name, $candidate->display_name, $proposal_link, $project_link
);
$participant = array(
'recipient' => $employer->ID,
'message' => $subject_message,
'send_mail' => array(
'content' => wpautop( $content ),
),
'meta' => array(
'subject' => wp_strip_all_tags( $subject_message ),
'project_id' => $proposal->project->ID,
'action' => esc_url( get_the_hrb_proposal_url( $proposal ) ),
),
);
appthemes_send_notification( $participant['recipient'], $participant['message'], 'proposal', $participant['meta'], array( 'send_mail' => $participant['send_mail'] ) );