Skip to content

Avoid repeated calls to api3 to build default line item options.

buildLineItemRows is currently fetching the entire default_contribution_amount from the API once per possible additional price field, which can cause significant slowdown on some sites. I get the impression the result isn't being cached properly, since it seems to mostly be a problem with slow database connection.

Since the parameters are the same for every call, the change here is simple – only fetch it from the API the first time through.

Edited by Francis (Agileware)

Merge request reports