Kan. Stat. Ann. § 59-2312
The court may in its discretion, after notice to all parties in interest, allow a real estate commission, but such allowance shall be passed upon by the court prior to the sale.
L. 1939, ch. 180, § 267; July 1.