On my civicrm contribution page I have a field that I want to use to calculate the membership price.
Currently Im trying to use the membershipTypeValues hook to edit the price after the contribution page has been submitted
Heres the code
add_filter('civicrm_membershipTypeValues', "updatePrice", 10, 2);
function updatePrice(&$form, &$membershipTypeValues) {
$membershipTypeValues[14]['minimum_fee'] = "40.00";
}
Theoretically this should change the membership price to $40 but the price doesn't change on the conformation screen.
The code runs and if I print out the $membershipTypeValues array I can see the minimum fee has changed to $40
Any ideas on how to fix this would be great
Thank you