mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-03 12:12:25 +08:00
9 lines
345 B
Text
9 lines
345 B
Text
add_filter( 'post_class', 'wc_disable_admin_orders_table_row_link' );
|
|
|
|
function wc_disable_admin_orders_table_row_link( $classes ) {
|
|
if ( is_admin() ) {
|
|
$current_screen = get_current_screen();
|
|
if ( $current_screen->base == 'edit' && $current_screen->post_type == 'shop_order' ) $classes[] = 'no-link';
|
|
}
|
|
return $classes;
|
|
}
|