The base commerce order report is always provided even when it is not being used as a report, except as a base class. With tens of thousands of reports, this adds unnecessary work and time.

The attached patch provides an alter hook to allow sites to remove `commerce_order_report` from the list of report types.

Comments

rthornton created an issue. See original summary.

travis-bradbury’s picture

Status: Needs review » Needs work

The function in the api.php file should be named hook_commerce_order_reports_report_types_alter.

+ * @param CommerceOrderReport[] $report_types
+ *   A list of commerce order report types as generated by
+ *   hook_commerce_order_reports_report_types().

That could be "A list of commerce order report types" with an "@see hook_commerce_order_reports_report_types()" after. I think d.o's documentation generator would prefer style that since it'd like to the @see stuff.

rthornton’s picture

StatusFileSize
new1.66 KB

Updated for correct hook name and @see reference.

rthornton’s picture

Status: Needs work » Needs review
rthornton’s picture

StatusFileSize
new1.66 KB
travis-bradbury’s picture

Status: Needs review » Reviewed & tested by the community

  • rthornton authored 472d22d on 7.x-1.x
    Issue #3016513 by rthornton, tbradbury: Needs alter hook to remove base...
travis-bradbury’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.