Instructions Field Only Appears if Shipping Address Different

I finally figured out why the Special Instructions field isn't displaying as expected...

The Special Instructions box only appears under the shipping address if "Shipping address different than billing?" is selected. If left unchecked, there is no way to enter Special Instructions!

This will be confusing to users who enter their address and don't check the box. I must have have special instructions because of this bug causing us to ask customers to enter shirt sizes upon checkout.

So...How can I get the Instructions box to appear under the default address if users do not select the Different Address box?

This is the workaround I did for now:
To display the Shipping Address info, and Special Instructions field, upon checkout. I made the Different Address checked by default.

Add checked="checked" to:
<label class=&quot;mp_form_label&quot;><input type=&quot;checkbox&quot; class=&quot;mp_form_checkbox&quot; name=&quot;enable_shipping_address&quot; value=&quot;1&quot; autocomplete=&quot;off&quot; checked=&quot;checked&quot; ' . checked( true, $enable_shipping_address, false ) . '> <span>' . __( 'Shipping address different than billing?', 'mp' ) . '</span></label>

But I hate hacking core files, and will surely forget this edit upon some future upgrade.

Please advise how I can show the Special Instructions field by default to all customers upon checkout if I am just missing some setting somewhere.

Otherwise, please pass this on to the awesome developers to consider addressing in a future update.


  • jcnjr

    Looks like the gremlins chewed up the quotes in that code edit. Here's a clean copy of the hack to class-mp-public.php:1063.

    <label class="mp_form_label"><input type="checkbox" class="mp_form_checkbox" name="enable_shipping_address" value="1" autocomplete="off" checked="checked" ' . checked( true, $enable_shipping_address, false ) . '> <span>' . __( 'Shipping address different than billing?', 'mp' ) . '</span></label>

  • Adam Czajczyk

    Hello jcnr,

    Thank you for your patience.

    I just got a confirmation from MarketPress lead developer that if "special instructions" option is enabled the field should show up under the "Billing/Shipping" form regardless whether the "Shipping address different than billing" is checked or not.

    Since it doesn't work this way it must be reported as a bug so I've already filled a bug report and hopefully he'll be able to fix that soon and include fix with one of the nearest plugin updates. I'm not able to give you an ETA on this, however as it's already a confirmed bug it should be fixed soon.

    Best regards,

  • jcnjr

    I'm sure the devs are frantically working to get out an update addressing the product variations issue, but this one is important too so I wanted to share my attempt at a fix...

    I'm no developer, but am apparently a fairly able hack since I just confirmed the following edits get the Special Instructions to display under Billing Info (instead of the Shipping column), AND pass the info entered on to the Order info Page. Unfortunately it is still not being included in the notification email.

    If an update is going to take a while, I'd appreciated anyone reviewing this code and advise if there is any cause for alarm...I've got it working on our test store, and would like to implement this on the live store. Unless anyone recommends otherwise.

    If it looks good, please pass on to the MP devs for review and consideration. Any thoughts on getting the Special Instructions into the email too are also appreciated.


    Hacked Files Attached:

    NOTE: Special Instructions code moved to line 1067.

    FYI: Editing just the above file, allowed me to checkout without error, but did not include instructions in order info or notification email. After editing helpers.php, the info is included on the Orders admin page, but still not in notification email. So close...

    Special Instructions at line 196 edited to reflect 'mp_shipping_billing_info->special_instructions' instead of 'mp_shipping_info'.

  • jcnjr

    Apparently those text files were not allowed... :-\

    I describe the hack to class-mp-checkout.php.

    Here's what I did to helpers.php:

    // Special Instructions <- HACKED TO FIX UNDER BILLING?
    		if ( $order->get_meta( 'mp_shipping_billing_info->special_instructions' ) ) {
    			$shipping_billing_info .= "<br /><strong>" . __( 'Special Instructions:', 'mp' ) . ':</strong>' . wordwrap( $order->get_meta( 'mp_shipping_billing_info->special_instructions' ) );

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.