No party command MZ

I'm looking for a way to disable the party command in battle for RPG Maker MZ. I've tried this code as a plugin and a scrtipt call.
//=======================================================================
// Skips over the Party Command Window when first entering Battle
Scene_Battle.prototype.startPartyCommandSelection = function() {
this._statusWindow.deselect();
this._statusWindow.show();
this._statusWindow.open();
this._actorCommandWindow.setup(null);
this._actorCommandWindow.close();
this._partyCommandWindow.setup();
this.selectNextCommand(); // Automatically chooses "Fight" pushing you into the Actor Window
};
//=======================================================================
The problem is when I choose actions in battle the game crashes and gives me this message "RangeError Maximum call stack size exceeded".
I got the code from a thread that's too old to post on.https://forums.rpgmakerweb.com/index.php?threads/skip-remove-party-command-window-mz.154179/

Closing, since this is a duplicate thread.

Original thread: https://forums.rpgmakerweb.com/threads/no-party-command-mz.176550/