I wanna remove the functionality of when you click on a order row in Orders in Admin, you will be sent to the edit page for that order.
I know it's added with jQuery in a js-file in the WooCommerce plugin. I have located the 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;
}
}
};
But I don't wanna change any code in the plugin. And there aren't js hooks or any php hook that can control that part of code.
So I guess the option is to add the no-link
class to the columns in the list? How do I do that? I can't find anything about how to do that.