How to fetch customer_billing from an order?
After an order is completed I need to fetch the customer billing via rules to attach it to the product with an Entity Reference Field.
I tried this:
- fetching the customer billing from an oder: $variable_added = [commerce-order:commerce-customer-billing];
- loop all line items of an order
- get product
- if product has field: Entity Reference
- get Entity Reference Field as Customer Profile List
- add item to a list: fetched customer profile
- save the product
The problem ist:
the customer profile is not attached to the product after completing an order.
So... what's wrong?