You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the ability to save the order note with the addressbook so it can will be autofilled as well.
I was hoping to ask a quick question regarding the WooCommerce Address Book plugin for WordPress you are credited with authoring https://en-gb.wordpress.org/plugins/woo-address-book/ - is it possible to save the 'order notes' field data alongside the address information? The idea is that if a customer always has the same instruction for a particular address this would be auto-filled alongside the rest.
I am working on a client's site which uses the order notes field when a particular shipping option is selected, however I don't believe it currently saves that information which would be useful for what they have asked. The 'order notes' is a base WooCommerce feature found in woocommerce/templates/checkout/form-shipping.php and is part of the 'shipping' fields.
The text was updated successfully, but these errors were encountered:
The Order Note field is its own checkout field which is not linked to the Billing or Shipping addresses. In order to have it linked to one of them would take a lot of override code in both the checkout in order to change it when selecting address. But you would also need to customize the WooCommerce core Edit Address pages to both show and save the custom fields to be able to save them to an address. This could get very messy having to deal with saving and retrieving the data.
A much easier solution would be to just add another Textarea field to either Billing or Shipping address.
Something like this:
add_filter( 'woocommerce_shipping_fields', 'custom_override_shipping_fields' );
function custom_override_shipping_fields( $fields ) {
$fields['shipping_instructions'] = array(
'label' => __('Delivery Instructions', 'woocommerce'),
'placeholder' => esc_attr__(
'Notes about your order, e.g. special notes for delivery.',
'woocommerce'
),
'type' => 'textarea',
'class' => array( 'notes' )
);
return $fields;
}
Add the ability to save the order note with the addressbook so it can will be autofilled as well.
The text was updated successfully, but these errors were encountered: