After upgrading to CiviCRM 4.7.27 on WordPress 4.9.1 the civi contribute pages for donations are only rendering for users who are logged into the WordPress backend. Enabling PHP error reporting gives this error: Fatal error: Call to undefined method CRM_Price_BAO_PriceField::getVisibilityOptionID() in /var/www/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 1062.

Any suggestions for resolution? I checked the documentation for CRM_Price_BAO_PriceField and could not find the referenced method (edit: I was able to find the method in the github files and on my server (PriceSet.php and PriceField.php), it just doesn't appear on the doc.symbiotic.coop core file information pages)

The current error doesn't seem to be generating a backtrace, you can go to www.parksandtrails.org and click on the 'Donate Now' or 'Join or Renew Now' links to see the error as listed above, but no backtrace when that happens.

2 Answers 2


That method IS present in 4.7.27 - it's at line 892.

If it's not present for you, then either:

  • There's something squirrelly in your upgrade process - perhaps some file wasn't actually replaced;
  • You've got some extension or PHP override that's overriding the file in question.
  • You're right, it is there, I was looking at the core documentation on doc.symbiotic.coop based on a google search. The files on github and my server both have the method. Still not sure why it's working for logged in admins but not public site visitors.
    – Survifit
    Dec 5, 2017 at 22:00
  • That means it's likely an extension/override causing this. Please check your ConfigAndLog log and edit your question to include the backtrace, and we can identify the source of the issue. Dec 5, 2017 at 22:24

My coworker finally found copies of both PriceSet.php and PriceField.php in the customPHP folder from an old customization. Once the new method was added to both files the page began to work normally again.

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.