Pass in contribution_id to membership.create when chaining for profil…#35647
Pass in contribution_id to membership.create when chaining for profil…#35647mattwire wants to merge 1 commit into
Conversation
…es so that lineitems are correctly linked to the contribution straight away
|
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
|
@mattwire I think it would be good to deprecate this api but definitely to deprecate passing contribution_id into Membership:create - we could do extra handling in the Profile.create api to create the contribution - e.g call the order api instead..... |
I agree, but was trying to do minimal changes here so I can get LineItem writerecord PR over the line. |
|
@mattwire yeah - I'm still getting there on whether I agree with your approach on that - just trying to deal with all this noise - all the work I'd done prior had gotten me to thinking LineItem.create should only write line items & we should have one or two functions that handle the financial item business logic - but at the moment there are all these other things flying past so trying to make sure we aren't adding to things that should be deprecated |
…es so that lineitems are correctly linked to the contribution straight away
Partial from #35082
Overview
Membership gets created first with lineitems that then have to be linked up to contribution later.
Just create the contribution first and chain it through to membership
Before
Membership created first, we don't have contribution yet.
After
Contribution created first, then passed to Membership create.
Technical Details
Described in code comments
Comments