The error below is displayed when no shipping data is available to the module:

EntityMetadataWrapperException: Unknown data property commerce_customer_shipping. em EntityStructureWrapper->getPropertyInfo() (linha 335 de docroot/sites/all/modules/contrib/entity/includes/entity.wrapper.inc).

That happens because the property on line 245 does not exist:
elseif ($order_wrapper->commerce_customer_shipping->value()) {

Patch to fix the issue attached.

I could use a try/catch block here, but it would make no sense to "catch" errors here because having no shipping field/information is a completely valid use case, thus I used entity API's own method to check for the data property.

CommentFileSizeAuthor
#1 error-no-shipping-data-2341797-2.patch1.16 KBFidelix
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Fidelix’s picture

Status: Active » Needs review
FileSize
1.16 KB