Sorry for the delay.
If you are using WooCommerce, add this on line 241 in mycred/addons/gateway/carts/mycred-woocommerce.php:
/**
* Parse Email Notice
* @since 1.2.2
* @version 1.0
*/
add_filter( 'mycred_email_before_send', 'mycred_woo_parse_email' );
function mycred_woo_parse_email( $email )
{
if ( $email['request']['ref'] == 'woocommerce_payment' ) {
$order = new WC_Order( (int) $email['request']['ref_id'] );
if ( isset( $order->id ) ) {
$url = esc_url( add_query_arg( 'order', $order->id, get_permalink( woocommerce_get_page_id( 'view_order' ) ) ) );
$content = str_replace( '%order_id%', $order->id, $email['request']['entry'] );
$email['request']['entry'] = str_replace( '%order_link%', '<a href="' . $url . '">#' . $order->id . '</a>', $content );
}
}
return $email;
}
If you are using Marketpress add this on line 500 in mycred/addons/gateway/carts/mycred-marketpress.php:
/**
* Parse Email Notice
* @since 1.2.2
* @version 1.0
*/
add_filter( 'mycred_email_before_send', 'mycred_woo_parse_email' );
function mycred_woo_parse_email( $email )
{
if ( $email['request']['ref'] == 'marketpress_payment' ) {
$order = get_post( (int) $email['request']['ref_id'] );
if ( isset( $order->id ) ) {
$track_link = '<a href="' . mp_orderstatus_link( false, true ) . $order_id . '/' . '">#' . $order->post_title . '/' . '</a>';
$content = str_replace( '%order_id%', $order->post_title, $email['request']['entry'] );
$email['request']['entry'] = str_replace( '%order_link%', $track_link, $content );
}
}
return $email;
}