WooComerce order cheatsheet

Parent order id

$order->get_parent_id() - int

Verze objednávky

$order->get_version() - string

Ceny včetně daně

$order->get_prices_include_tax() - array

Stav objednávky

 $order->get_status() - string

Měna objednávky

 $order->get_currency() - string

Datum vytvoření / modifikace objednávky

$order->get_date_created() - WC_Datetime
$order->get_date_modified() - WC_Datetime

Částka slevy a její daň

$order->get_discount_total() - string
$order->get_discount_tax() - string
$order->get_total_discount( true/false ) true = s daní - float

Částka dopravy a její daň

$order->get_shipping_total() - string
$order->get_shipping_tax() - string

Částka daně v košíku

$order->get_cart_tax() - float

Objednávka celkem a daň celkem

$order->get_total() - float
$order->get_total_tax() - float
$order->get_subtotal() - float
$order->get_tax_totals() - array
$order->get_formatted_order_total() - string

Platné stavy pro aktuální objednávku

$order->get_valid_statuses() - array

Uživatel – pokud objednávku vytvořil uživatel

$order->get_user_id() - int
$order->get_user() - WP_User|false
$order->get_customer_id() - int

ID objednávky

$order->get_id() - int

Číslo objednávky

$order->get_order_number() - string

Unikátní klíč objednávky

$order->get_order_key() - string

Hodnota z pole doručovací, nebo fakturační adresy

$order->get_customer_id( 'address', 'billing' )

Fakturační adresa

$order->get_billing_first_name()
$order->get_billing_last_name()
$order->get_billing_company()
$order->get_billing_address_1()
$order->get_billing_address_2()
$order->get_billing_city()
$order->get_billing_state()
$order->get_billing_postcode()
$order->get_billing_country()
$order->get_billing_email()
$order->get_billing_phone()

Doručovací adresa

$order->get_shipping_first_name()
$order->get_shipping_last_name()
$order->get_shipping_company()
$order->get_shipping_address_1()
$order->get_shipping_address_2()
$order->get_shipping_city()
$order->get_shipping_state()
$order->get_shipping_postcode()
$order->get_shipping_country()