Sprawdź, czy istnieje identyfikator zamówienia WordPress Woccommerce

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