if ($meio['Sedex'] == '0') { unset($oFrete['Sedex']); } if ($meio['PAC'] == '0') { unset($oFrete['PAC']); } return $oFrete; } public function converteValor($weight, $unit) { switch ($unit) { case "kilogram": $weight = $weight * 0.45359237; break; case "gram": $weight = $weight * 453.59237; break; case "once": case "ounces": $weight = $weight * 16; break; default: $weight = $weight; break; } return $weight; } } $pagseguro = new pagseguro(); $wpsc_shipping_modules[$pagseguro->getInternalName()] = $pagseguro;