I need to remove the functionality of when clicks on an order row in Orders in Admin, you will be sent to the edit page for that order.
Actual code:
/**
* Click a row.
*/
WCOrdersTable.prototype.onRowClick = function( e ) {
if ( $( e.target ).filter( 'a, a *, .no-link, .no-link *, button, button *' ).length ) {
return true;
}
if ( window.getSelection && window.getSelection().toString().length ) {
return true;
}
var $row = $( this ).closest( 'tr' ),
href = $row.find( 'a.order-view' ).attr( 'href' );
if ( href && href.length ) {
e.preventDefault();
if ( e.metaKey || e.ctrlKey ) {
window.open( href, '_blank' );
} else {
window.location = href;
}
}
};
I am not looking to change any code in the plugin. Also there aren't js hooks or any php hook that can control that part of code. What to do