Hmmmm....I think this will work:
if ( $_SESSION['USPS_Shipping'] == 'PRIORITY' ) {
echo '$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "FLAT RATE BOX"; ';
} else {
echo '$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "YOURPACKAGING"; ';
}
Hard to tell since I have other shipping errors going on that we're trying to figure out with a support ticket.