We should check that the entity has fields (ie: commerce_customer_shipping) before attempting to set their value in commerce_addressbook_commerce_order_insert(). Even though, order bundles aren't recommended in the current version of commerce, this module dies fatally when using them because of this bug.

Here's a patch does the check using the wrappers getPropertyInfo() method. We could use field_info_instance or something else if that's preferred, but this works for me.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

akosipax’s picture

Status: Active » Needs review

Looks good!

mglaman’s picture

Status: Needs review » Fixed

Looks like this was fixed in #2070643: Default address not always used in checkout pane and checks field instances for the order bundle.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.