Compruebe si existe la identificación del pedido WordPress Wocmerce

function is_it_a_shop_order($givenNumber)
{   
    if(get_post_type($givenNumber) == "shop_order")
    {
        echo "yes this is a valid order number";
    }
    else
    {
        echo "no go away";
    }
}
Embarrassed Eel