In the USPS shipping module, around line 209, you find the code:
Code:
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
So you are adding your code for the IF around that piece of code and changing it ...
Code:
if ($type == 'MEDIA' && $_SESSION['cart']->in_cart_check('master_categories_id','10') != $_SESSION['cart']->count_contents()) {
// skip MEDIA when whole cart is not from master_categories_id 10
} else {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
}
That will allow MEDIA to show only when ALL Products in the shopping cart are using master_categories_id 10 ...