0

After submitting the profile with success from the front-end of the site, a civicrm contact is created but the following hook is not working..

function wordpress_civicrm_processProfile($name) {
        if ($name === 'supporter_profile_91') {
                die('we are here');
                //also tried error_log(); nothing!
        }
}

Its written in wp-content/plugins/files/civicrm/custom-PHP/civicrmHooks.php and other civihooks/wp functions in that file are firing correctly.

Profile set from Manage Contribution Pages > [Specific Contribution Page] > Personal Campaigns [tab] > Supporter Profile

1 Answer 1

0

Turns out, this hook is not called when a profile form is submitted on the front-end of the site. The hook is fired during the creation/edit of a profile. Found through a Google search

Page Title: hook_civicrm_processProfile - CiviCRM 4.3 Documentation ARCHIVE ...
Page Link: wiki.civicrm.org:8090/confluence/pages/viewpage.action?pageId=86638695

Dropped the port 8090 in the SERP link to see the wiki page that says:

This hook is invoked when processing a submitted CiviCRM profile form (e.g. for "civicrm/profile/create" or "civicrm/profile/edit"). This hook may be used to inject additional markup, scripts, or styles on the profile.

I dont know why that important detail was dropped among other important details. The most recent wiki has no such text.

Edit: added as issue in 2017devdocs.

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.