Adding special instructions field to all notification emails

I've been trying to work with these support topics:


and I'm having problems getting this to work with the most recent install of Marketpress (2.6.4). Each time I try to cut and paste code I've used in the past it's breaking the plugin. I'm not super well versed in php and I know I'm doing something wrong. Trying to get this to work for .

1) Can you please in as plain english as possible tell me what code to put where in the php file to have special instructions show up in admin notification emails? And how to get it to show up in the customer's notification email as well?

2) Can I request please pretty please to have this be something that's standard for a future release of Marketpress?

Thanks in advance!

  • Timothy Bowers

    Hey there.

    1. I'm confused because in one of those threads it implies that you make the changes everytime.

    Was it not working back then.

    If you follow Rob in here:

    He refers to which file needs editing and such. Unfortunately if this isn't something you're able to do then it might be worth hiring a developer to handle it for now.

    2. I've moved this over to the feature request forums, if other members are looking for this then please add your support here so that we can present this to our development team.

    I can see this being real handy, so it gets my +1 on this! :slight_smile:


  • Steph Calvert

    Hi Timothy!

    I'm not super-php-gal, so every time I have a Marketpress install that I have to do, I come back to those two forum strings and decipher how to make it work. It takes a bunch of tries but I somehow muddle through.

    Recently I had problems with updating to the latest version of Marketpress on the site. Once I got the plugin working, every time I tried to update the php code to include the special instructions field in the notification emails it broke the plugin and I'd have to reinstall.

    I don't know what's different with this version of Marketpress or what's different with how I'm trying to do it, but the steps I used to take just aren't working for me anymore and if I could get help from someone on how to do it that would be great.

    Basically - taking those two forum strings and the most current version of Marketpress... how do I get the special instructions to show up in the notification emails?

  • Timothy Bowers

    Hey again.

    So open:


    It's now line 3943.

    You see:

    //setup filters
        $replace = array($order->mp_shipping_info['name'], $order->post_title, $order_info, $shipping_info, $payment_info, $order_total, $tracking_url, $order_notes);
        $text = str_replace($search, $replace, $text);

    And change it to:

    //setup filters
        $replace = array($order->mp_shipping_info['name'], $order->post_title, $order_info, $shipping_info, $payment_info, $order_total, $tracking_url, $order_notes, $order->mp_shipping_info['special_instructions']);
        $text = str_replace($search, $replace, $text);

    Then go to:

    Admin --> Products --> Settings --> Messages

    And in the top two order emails add:


    You can put that where you wish, then in the email which comes out will have it in that position.

    I hope this clarifies?

    Take care.

  • Steph Calvert

    Hey there!

    I'm not sure what is going on, but whenever I try to update marketpress.php, the plugin stops working. I literally cut and pasted your code into the file and the plugin stopped working. Same problem I was having last week, where the wp-admin page becomes unavailable and I have to re-install the plugin. It shouldn't happen that way, and it's bizarre.

    Short of asking you to log in and fix this for me, I'm going to advise the client to please check their orders in the site backend for special instructions and pray that the next update of Marketpress has the special instructions in the emails as a standard feature.


  • Timothy Bowers

    Is it like a white page or something?

    I wonder if your editor is adding something extra into the mix.

    How are you editing the PHP file? Which app?

    I'm wondering if it's a headers already sent error?

    Let me know.

    I'm happy to make the quick change for you, but it won't help you on the next update or any subsequent ones. So would probably be best to find out what's causing it for you.

    Take care.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.