<?php

session_start();
unset($_SESSION['frete']);
setcookie('frete', ""); //apagar o cookie caso exista

//criar o cookie somente se a session for diferente de vazio
if (!empty($_SESSION['frete'])):
    setcookie('frete', serialize($_SESSION['frete']), time() + 3600); //cria o novo cookie
endif;