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 in the interface to assign membership start date onto payment plan start date (first contribution received date) automatically when the payment plan is selected.
Since Membership extras version 5 is using membership start date as a first contribution received date when creating a new membership, the validation to check that membership start date is required is added to the form on the existing validation Form hook.
Before
First contribution receive date in the payment plan is always set as sign up date.
Membership can be created without select membership start date (civicrm will assign start date automatically based on membership type)
After
First contribution receive date in the payment plan will always be set as membership start date.
Membership will only be created only when membership start date is selected or the form will throw an error if membership start date is not set.
Technical Details
The logic to set receive date as membership start date is done on UI because if we use pre hook to alter contribution receive date param, we could encounter the issue where the first contribution may not always be membership start date when renew the membership
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 in the interface to assign membership start date onto payment plan start date (first contribution received date) automatically when the payment plan is selected.
Since Membership extras version 5 is using membership start date as a first contribution received date when creating a new membership, the validation to check that membership start date is required is added to the form on the existing validation Form hook.
Before
After
Technical Details
The logic to set receive date as membership start date is done on UI because if we use pre hook to alter contribution receive date param, we could encounter the issue where the first contribution may not always be membership start date when renew the membership