From 9aa4d8108412b199becfd9c748183312aa2a7401 Mon Sep 17 00:00:00 2001 From: Caleb Burks <19caleb95@gmail.com> Date: Thu, 1 Feb 2018 01:01:49 -0500 Subject: [PATCH] Add product ID to row actions --- .../class-wc-admin-list-table-products.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/admin/list-tables/class-wc-admin-list-table-products.php b/includes/admin/list-tables/class-wc-admin-list-table-products.php index ee6e6db584d..d7d5775bb3b 100644 --- a/includes/admin/list-tables/class-wc-admin-list-table-products.php +++ b/includes/admin/list-tables/class-wc-admin-list-table-products.php @@ -63,6 +63,17 @@ class WC_Admin_List_Table_Products extends WC_Admin_List_Table { return 'name'; } + /** + * Get row actions to show in the list table. + * + * @param array $actions Array of actions. + * @param WP_Post $post Current post object. + * @return array + */ + protected function get_row_actions( $actions, $post ) { + return array_merge( array( 'id' => 'ID: ' . $post->ID ), $actions ); + } + /** * Define which columns are sortable. *