Marketpress New Purchase Admin Email Error

WP 3.3.1

Marketpress 2.4.2

BP 1.5.4

I think I found a bug. When you use a coupon, then complete your transaction, the email that gets sent to the site admin notifying them that there is a new order, is blank. The confirmation that goes to the user is fine. I believe this is the issue, correct me if im wrong

in marketpress.php

in function filter_email()

//coupon line
if ( $order->mp_discount_info ) {
$order_info .= "n" . __('Coupon Discount:', 'mp') . ' ' . $order->mp_discount_info['discount'];
}

the mp_discount_info returns something like -10% or whatever you put your discount to for the coupon. the “%” in it I believe does not play nice later on in the function when it gets to

$subject = $this->filter_email($order, $subject);
$msg = $this->filter_email($order, $msg);
$msg = sprintf($msg, $order->mp_shipping_info['email'], admin_url('edit.php?post_type=product&page=marketpress-orders&order_id=') . $order->ID);
$store_email = isset($settings['store_email']) ? $settings['store_email'] : get_option("admin_email");
$this->mail($store_email, $subject, $msg);

I think the sprintf function does not like being fed a “%”

My work around for this is below, im pretty much changing the % to the word “Percent”

FIX

FIND

//coupon line
if ( $order->mp_discount_info ) {
$order_info .= "n" . __('Coupon Discount:', 'mp') . ' ' . $order->mp_discount_info['discount'];
}

REPLACE WITH

//coupon line
if ( $order->mp_discount_info ) {
//TAO coupon code has a % sign in it, and the sprintf function does not like it so im converting it to the words percent
$TAO_discount_percentage_words = str_replace('%', ' Percent', $order->mp_discount_info['discount'] );
$order_info .= "n" . __('Coupon Discount:', 'mp') . ' ' . $TAO_discount_percentage_words;
}