I am currently using external image sources for my products on WooCommerce.

So i would like to replace the default thumbnail / image across the site.

I have managed to do this everywhere with the corresponding hooks and filters, apart from on the the main products admin screen.

I have the below function:

add_filter('manage_posts_custom_column', 'admin_column_thumbnail');
function admin_column_thumbnail($column_name, $id){
    if($column_name === 'thumb'){
        echo '<a href="' . get_edit_post_link() . '">';
        echo the_post_thumbnail( 'admin-list-thumb' );
        echo '</a>';

This to a degree works, it adds the new external image as a thumb, but it also leaves the default placeholder in (to the right of the newly inserted image).

Is there something i am missing? I thought adding a filter replaces the original code of that function / hook?

Any help would be greatly appreciated, Thanks!

  • The correct filter is manage_product_posts_custom_column – vadims Oct 20 '20 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.