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
From a front end request, if cart addresses are not set they return null. However, when addresses are not set and a line item is added to the cart from the CP order edit page, it appears to be returning an address model with all empty or null attributes. As a result, when the order recalculates any adjusters that do a boolean or null check against shippingAddress return true but then throw errors when trying to access attributes from the empty address model. For consistency, is it possible to return null for shippingAddress and billingAddress from the CP order edit page when addresses are not set?
Additional info
Craft version: 3.4.15
PHP version: 7.2.24
Database driver & version: MySQL 5.5.5
Plugins & versions: Commerce 3.1.2
The text was updated successfully, but these errors were encountered:
Description
From a front end request, if cart addresses are not set they return null. However, when addresses are not set and a line item is added to the cart from the CP order edit page, it appears to be returning an address model with all empty or null attributes. As a result, when the order recalculates any adjusters that do a boolean or null check against
shippingAddress
return true but then throw errors when trying to access attributes from the empty address model. For consistency, is it possible to return null forshippingAddress
andbillingAddress
from the CP order edit page when addresses are not set?Additional info
The text was updated successfully, but these errors were encountered: