Currently, if you are in twig you have access to primaryBillingAddressId and primaryShippingAddressId on the User element, and isPrimaryBilling and isPrimaryShipping on the Address element.
However these properties were missing from the fields definitions for both of these elements. There for if you were interacting with the system via AJAX you would not receive those properties as part of the responses.
This PR adds those in as well as attempts to optimise both the user and address queries to try and negate any performance issues.
Description
Currently, if you are in twig you have access to
primaryBillingAddressId
andprimaryShippingAddressId
on theUser
element, andisPrimaryBilling
andisPrimaryShipping
on theAddress
element.However these properties were missing from the fields definitions for both of these elements. There for if you were interacting with the system via AJAX you would not receive those properties as part of the responses.
This PR adds those in as well as attempts to optimise both the user and address queries to try and negate any performance issues.