On WooCommerce admin Products List, all products are listed, but the product Name / Title is shortened, with an ellipse at the end...
I have searched all over how to make the product title showing in full but without any success, I can change it on the front end but not in the admin dashboard at all.
add_filter( 'the_title', 'shorten_woo_product_title', 10, 2 );
function shorten_woo_product_title( $title, $id ) {
if ( ! is_singular( array( 'product' ) ) && get_post_type( $id ) === 'product' ) {
return wp_trim_words( $title, 4, '...' ); // change last number to the number of words you want
} else {
return $title;
}
}
Now this changes the product name in the front end, but it's still shortened on the admin products list. I need to show it full Title/Name in admin side.
This answer also shows how to change it on the front end:
I am using WordPress 6.2.2 and WooCommerce 7.8.0
UPDATE
Screenshot of the Problem:
Actually, you don't know what you are editing until you go into the product. This is the main reason I would like to have the title / Name in full.