Remove autoformating on Marketpress Messages textarea

I can't install the HTML email plugin because it conflicts.
I have code in function.php to allow text/html for WPmail.

For the Marketpress messages, the textbox auto format anything I place in it. How can I remove this?

I tried altered the code below to remove the stripslashes but that didn't work? Any ideas? Thanks.

//sends email for new orders
	function order_notification($order_id) {

	 //get the order
	 $order = $this->get_order($order_id);
	 if (!$order)
		return false;

		$subject = apply_filters('mp_order_notification_subject', $this->filter_email($order, stripslashes($this->get_setting('email->new_order_subject'))), $order);
		$msg = apply_filters('mp_order_notification_body', $this->filter_email($order, stripslashes($this->get_setting('email->new_order_txt'))), $order);
		$msg = apply_filters('mp_order_notification_' . $_SESSION['mp_payment_method'], $msg, $order );

	 $this->mail($order->mp_shipping_info['email'], $subject, $msg);
  • Vinod Dalvi
    • WP Unicorn

    Hi Amir,

    Thank you for your question.

    For the Marketpress messages, the textbox auto format anything I place in it. How can I remove this?

    Are you talking about content entered in the New Order and Order Shipped MarketPress email notifications?

    Could you please tell me a bit in detail what is exactly happening that you don't want it to happen so that i can help you to achieve it?

    Kind Regards,
    Vinod Dalvi

  • Amir
    • Site Builder, Child of Zeus

    Yes, in the new order marketpress message notification.

    I need to put html code so the email formats properly. I am using Html in the appointment+ plugin message area and need the confirmation emails to match the confirmation from marketpress.

    The formatting in the marketpress removes the html tags.

  • Vinod Dalvi
    • WP Unicorn

    Hi Amir,

    The new order marketpress message notification doesn't send email in HTML format, i don't know is it forcefully not allowed or can be considered as a feature request so i will see if i can get the plugin developer here for his advise for us.

    Event thought the MarketPress doesn't support HTML in email, you can make it work by changing / adding the following code in MarketPress plugin files.

    Remove / Comment the code in the plugin file marketpress/marketpress.php on line number 6975 as following.

    Before Editing:

    //remove html from emails
     $_POST['mp']['email'] = array_map('wp_filter_nohtml_kses', (array)$_POST['mp']['email']);

    After Editing:

    //remove html from emails
    // $_POST['mp']['email'] = array_map('wp_filter_nohtml_kses', (array)$_POST['mp']['email']);

    Add / overwrite the code in the plugin file marketpress/marketpress.php on line number 4413 as following.

    Before Editing:
    return wp_mail($to, $subject, $msg);

    After Editing:

    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
    
    return wp_mail($to, $subject, $msg, $headers);

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.