Fixed
Project:
Commerce Core
Version:
4.x-dev
Component:
Commerce
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2026 at 20:12 UTC
Updated:
24 Nov 2026 at 10:48 UTC
Jump to comment: Most recent
There are two organizations, like current store vs order store: the current one (resolver chain, per request) and the order's one (the organization_id field). Once orders have the field, nothing copies the current organization onto them. Parent: #3638816: [META] Commerce 4.x roadmap.
CartProvider::createCart() sets the organization resolved for the account and store, the same moment the store is set. setOrganization() throws if it is not of the site's target type. Whether a cart gets an organization at all is up to the resolver (none in core), so commerce_b2b decides.OrderAssignment::assign() sets the organization resolved for the new customer and the order's store. This covers anonymous carts assigned on login (commerce_cart's user_login hook calls assignMultiple()), and admin reassignment gets the same rule.uid keeps its meaning (the person who buys); order emails still go to the customer email.Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
jsacksick commented