0

Only the "$formName" variable is getting supplied to the hook callback. Why are the rest of the variables listed in the documentation not getting supplied?

add_action('civicrm_postProcess', 'onFormSubmit');

function onFormSubmit() {
    $args = func_get_args(); // Returns ["CRM_Contribute_Form_Contribution"]
}

https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postProcess/

1 Answer 1

1

add_action defaults to 1 param: https://developer.wordpress.org/reference/functions/add_action/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.