Regression: Visiting contribution page while logged in and CiviMember is disabled causes a fatal error.
Overview
This one is my fault. PR is https://github.com/civicrm/civicrm-core/pull/25729.
Reproduction steps
- Disable CiviMember.
- Visit a contribution page whilel logged in.
Current behaviour
Civi\API\Exception\NotImplementedException: Membership API is not available because CiviMember component is disabled in /home/jon/local/mysite/web/wp-content/plugins/civicrm/civicrm/Civi/Api4/Generic/AbstractAction.php on line 454
Expected behaviour
No fatal error.
Comments
I replaced code that used the BAO to look up membership info with a call to a shared function that uses API4. However, API4 will throw an error if you access a disabled entity.