Closed erawat closed 3 years ago
Does direct debit start date logic interact with this? @erawat thanks
Does direct debit start date logic interact with this? @erawat thanks
@jamienovick yes, it interacts with this. The hook that alters DD received date will trigger and alter this.
Ok, is there anyway to bake in some tests around that to make sure that the two hooks don't fire in a different order if Civi changes something? @erawat
Ok, is there anyway to bake in some tests around that to make sure that the two hooks don't fire in a different order if Civi changes something? @erawat
@jamienovick the hook that alters DD contribution received date or any other extensions is dispatched inside this hook and always runs before creating recurring contribution which after the received date is altered with membership start date.
Overview
Membership Extras version 5 hides contribution received date field on the user interface by default and the default value also set to sign up date.
This PR adds logic to alter contribution receive date param to always use membership start date when creating payment plan on civicrm pre hook with contribution object
The contribution receive date param is used as
Before
After
Technical Details
Alter receive date param in the pre hook is preferred to create a logic in the UI set receive date as membership start date or membership join date as we can ensure that the first contribution receive date will always set as membership start date as well as the test can be done via unit test.