[Jobroller] "New Pending Order" email to Admin is missing the edit link
Hi,
Here's the problem : when paying an Order by Bank Transfer, an email is sent to the Admin noticing the new order, and finishes with two links like these :
However, the first one is not rendered as a link.
Here's the code, in file jobroller/includes/payments/gateways/bank-transfer/bt-emails.php line 9 :
PHP Code:
$order_link = html_link( get_edit_post_link( $post ), __( 'Review this order', APP_TD ) );
The problem, I think, is that get_edit_post_link() needs that current user has the rights to edit posts, which might not be the case. Also, I think it needs a post ID, and not a post.
I quickly dealed with if by replacing line 9 with :
PHP Code:
$order_link = html_link( admin_url( 'post.php?action=edit&post='.$post->ID ), __( 'Review this order', APP_TD ) );
Hope it'll help