Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | error-no-shipping-data-2341797-2.patch | 1.16 KB | Fidelix |
Comments
Comment #1
Fidelix CreditAttribution: Fidelix commented