I'm attempting to setup proration on fixed memberships via the civicrm_membershipTypeValues hook. I'm assuming that once the minimum_fee value is modified, this new amount should display on the contribution form.
In using the basic test code, with some debug messages inserted, I can see the hook is called, and the minimum fee value is updated, however the radio button selections for the membership types, retains its original "full period" price.
Currently testing with the following on Drupal 7.37/Civi 4.6.3 to test the ability to update the amount without success....
Appreciate any thoughts on how to implement proration....
function prorated_memberships_civicrm_membershipTypeValues( &$form, &$membershipTypeValues ) {
require_once "CRM/Core/Error.php";
foreach ( $membershipTypeValues as &$values) {
CRM_Core_Error::debug( 'olddump', $values);
if ( $values['name'] == 'General') {
$values['minimum_fee'] = "5.55";
}
if ( $values['name'] == 'Family') {
$values['minimum_fee'] = "2.22";
}
CRM_Core_Error::debug( 'newdump', $values);
}
}
require_once "CRM/Core/Error.php";
redundant.