Marketpress, how to go to the list of products after updating

Some of my users want to go straight back to the list of products once they hit the ‘update’ button. This is because they make a change, preview, if it is OK update and then want to move on to the list of products to search for the next one to update.

As a workflow I can understand this.

So I found out how to do it and just want to share the code snippet with the community if anyone wants to do similar.

// redirect direct to listing page after updating a product
function my_post_redirect($dest){
if ($pt=="product") $dest = home_url() ."/wp-admin/edit.php?post_type=product";
return $dest;


Hope it is useful to some people