PHP Класс WC_Order

Автор: WooThemes
Наследование: extends WC_Abstract_Order
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$data array Order Data array. This is the core order data exposed in APIs since 2.7.0.
$status_transition boolean | array Stores data about status changes so relevant hooks can be fired.

Открытые методы

Метод Описание
add_order_note ( string $note, integer $is_customer_note, $added_by_user = false ) : integer Adds a note (comment) to the order. Order must exist.
get_address ( string $type = 'billing' ) : array Returns the requested address in raw, non-formatted way.
get_billing_address_1 ( string $context = 'view' ) : string Get billing_address_1.
get_billing_address_2 ( string $context = 'view' ) : string Get billing_address_2.
get_billing_city ( string $context = 'view' ) : string Get billing_city.
get_billing_company ( string $context = 'view' ) : string Get billing_company.
get_billing_country ( string $context = 'view' ) : string Get billing_country.
get_billing_email ( string $context = 'view' ) : string Get billing_email.
get_billing_first_name ( string $context = 'view' ) : string Get billing_first_name.
get_billing_last_name ( string $context = 'view' ) : string Get billing_last_name.
get_billing_phone ( string $context = 'view' ) : string Get billing_phone.
get_billing_postcode ( string $context = 'view' ) : string Get billing_postcode.
get_billing_state ( string $context = 'view' ) : string Get billing_state.
get_cancel_endpoint ( ) : string Helper method to return the cancel endpoint.
get_cancel_order_url ( string $redirect = '' ) : string Generates a URL so that a customer can cancel their (unpaid - pending) order.
get_cancel_order_url_raw ( string $redirect = '' ) : string Generates a raw (unescaped) cancel-order URL for use by payment gateways.
get_cart_hash ( string $context = 'view' ) : string Get cart hash.
get_checkout_order_received_url ( ) : string Generates a URL for the thanks page (order received).
get_checkout_payment_url ( boolean $on_checkout = false ) : string Generates a URL so that a customer can pay for their (unpaid - pending) order. Pass 'true' for the checkout version which doesn't offer gateway choices.
get_created_via ( string $context = 'view' ) : string Get created_via.
get_customer_id ( string $context = 'view' ) : integer Get customer_id.
get_customer_ip_address ( string $context = 'view' ) : string Get customer_ip_address.
get_customer_note ( string $context = 'view' ) : string Get customer_note.
get_customer_order_notes ( ) : array List order notes (public) for the customer.
get_customer_user_agent ( string $context = 'view' ) : string Get customer_user_agent.
get_data ( ) : array Get all class data in array format.
get_date_completed ( string $context = 'view' ) : integer Get date_completed.
get_date_paid ( string $context = 'view' ) : integer Get date_paid.
get_formatted_billing_address ( ) : string Get a formatted billing address for the order.
get_formatted_billing_full_name ( ) : string Get a formatted billing full name.
get_formatted_order_total ( string $tax_display = '', boolean $display_refunded = true ) : string Gets order total - formatted for display.
get_formatted_shipping_address ( ) : string Get a formatted shipping address for the order.
get_formatted_shipping_full_name ( ) : string Get a formatted shipping full name.
get_item_count_refunded ( string $item_type = '' ) : string Gets the count of order items of a certain type that have been refunded.
get_order_key ( string $context = 'view' ) : string Get order key.
get_order_number ( ) : string get_order_number function.
get_payment_method ( string $context = 'view' ) : string Get the payment method.
get_payment_method_title ( string $context = 'view' ) : string Get payment_method_title.
get_qty_refunded_for_item ( integer $item_id, string $item_type = 'line_item' ) : integer Get the refunded amount for a line item.
get_refunds ( ) : array Get order refunds.
get_remaining_refund_amount ( ) : string How much money is left to refund?
get_remaining_refund_items ( ) : integer How many items are left to refund?
get_shipping_address_1 ( string $context = 'view' ) : string Get shipping_address_1.
get_shipping_address_2 ( string $context = 'view' ) : string Get shipping_address_2.
get_shipping_address_map_url ( ) : string Get a formatted shipping address for the order.
get_shipping_city ( string $context = 'view' ) : string Get shipping_city.
get_shipping_company ( string $context = 'view' ) : string Get shipping_company.
get_shipping_country ( string $context = 'view' ) : string Get shipping_country.
get_shipping_first_name ( string $context = 'view' ) : string Get shipping_first_name.
get_shipping_last_name ( string $context = 'view' ) : string Get shipping_last_name.
get_shipping_postcode ( string $context = 'view' ) : string Get shipping_postcode.
get_shipping_state ( string $context = 'view' ) : string Get shipping_state.
get_tax_refunded_for_item ( integer $item_id, integer $tax_id, string $item_type = 'line_item' ) : double Get the refunded amount for a line item.
get_total_qty_refunded ( string $item_type = 'line_item' ) : integer Get the total number of items refunded.
get_total_refunded ( ) : string Get amount already refunded.
get_total_refunded_for_item ( integer $item_id, string $item_type = 'line_item' ) : integer Get the refunded amount for a line item.
get_total_shipping_refunded ( ) : float Get the total shipping refunded.
get_total_tax_refunded ( ) : float Get the total tax refunded.
get_total_tax_refunded_by_rate_id ( integer $rate_id ) : float Get total tax refunded by rate ID.
get_transaction_id ( string $context = 'view' ) : string Get transaction_id.
get_user ( ) : WP_User | false Get the user associated with the order. False for guests.
get_user_id ( string $context = 'view' ) : integer Alias for get_customer_id().
get_view_order_url ( ) : string Generates a URL to view an order from the my account page.
has_cart_hash ( $cart_hash = '' ) : boolean See if order matches cart_hash.
has_downloadable_item ( ) : boolean Returns true if the order contains a downloadable product.
is_download_permitted ( ) : boolean Checks if product download is permitted.
is_editable ( ) : boolean Checks if an order can be edited, specifically for use on the Edit Order screen.
is_paid ( ) : boolean Returns if an order has been paid for based on the order status.
key_is_valid ( mixed $key ) : boolean Check if an order key is valid.
needs_payment ( ) : boolean Checks if an order needs payment, based on status and order total.
needs_shipping_address ( ) : boolean Checks if an order needs display the shipping address, based on shipping method.
payment_complete ( string $transaction_id = '' ) : boolean When a payment is complete this function is called.
save ( ) : integer Save data to the database.
set_billing_address_1 ( string $value ) Set billing_address_1.
set_billing_address_2 ( string $value ) Set billing_address_2.
set_billing_city ( string $value ) Set billing_city.
set_billing_company ( string $value ) Set billing_company.
set_billing_country ( string $value ) Set billing_country.
set_billing_email ( string $value ) Set billing_email.
set_billing_first_name ( string $value ) Set billing_first_name.
set_billing_last_name ( string $value ) Set billing_last_name.
set_billing_phone ( string $value ) Set billing_phone.
set_billing_postcode ( string $value ) Set billing_postcode.
set_billing_state ( string $value ) Set billing_state.
set_cart_hash ( string $value ) Set cart hash.
set_created_via ( string $value ) Set created_via.
set_customer_id ( integer $value ) Set customer_id.
set_customer_ip_address ( string $value ) Set customer_ip_address.
set_customer_note ( string $value ) Set customer_note.
set_customer_user_agent ( string $value ) Set customer_user_agent.
set_date_completed ( string $timestamp ) Set date_completed.
set_date_paid ( string $timestamp ) Set date_paid.
set_order_key ( string $value ) Set order_key.
set_payment_method ( string $payment_method = '' ) Set the payment method.
set_payment_method_title ( string $value ) Set payment_method_title.
set_shipping_address_1 ( string $value ) Set shipping_address_1.
set_shipping_address_2 ( string $value ) Set shipping_address_2.
set_shipping_city ( string $value ) Set shipping_city.
set_shipping_company ( string $value ) Set shipping_company.
set_shipping_country ( string $value ) Set shipping_country.
set_shipping_first_name ( string $value ) Set shipping_first_name.
set_shipping_last_name ( string $value ) Set shipping_last_name.
set_shipping_postcode ( string $value ) Set shipping_postcode.
set_shipping_state ( string $value ) Set shipping_state.
set_status ( string $new_status, string $note = '', boolean $manual_update = false ) Set order status.
set_transaction_id ( string $value ) Set transaction_id.
update_status ( $new_status, $note = '', $manual = false ) : boolean Updates status of order immediately. Order must exist.

Защищенные методы

Метод Описание
get_address_prop ( string $prop, string $address = 'billing', string $context = 'view' ) : mixed Gets a prop for a getter method.
maybe_set_user_billing_email ( ) Maybe set empty billing email to that of the user who owns the order.
set_address_prop ( string $prop, string $address = 'billing', mixed $value ) Sets a prop for a setter method.
status_transition ( ) Handle the status transition.

Описание методов

add_order_note() публичный Метод

Adds a note (comment) to the order. Order must exist.
public add_order_note ( string $note, integer $is_customer_note, $added_by_user = false ) : integer
$note string Note to add.
$is_customer_note integer (default: 0) Is this a note for the customer?
Результат integer Comment ID.

get_address() публичный Метод

Note: Merges raw data with get_prop data so changes are returned too.
С версии: 2.4.0
public get_address ( string $type = 'billing' ) : array
$type string Billing or shipping. Anything else besides 'billing' will return shipping address.
Результат array The stored address after filter.

get_address_prop() защищенный Метод

Gets a prop for a getter method.
С версии: 2.7.0
protected get_address_prop ( string $prop, string $address = 'billing', string $context = 'view' ) : mixed
$prop string Name of prop to get.
$address string billing or shipping.
$context string What the value is for. Valid values are view and edit.
Результат mixed

get_billing_address_1() публичный Метод

Get billing_address_1.
public get_billing_address_1 ( string $context = 'view' ) : string
$context string
Результат string

get_billing_address_2() публичный Метод

Get billing_address_2.
public get_billing_address_2 ( string $context = 'view' ) : string
$context string
Результат string $value

get_billing_city() публичный Метод

Get billing_city.
public get_billing_city ( string $context = 'view' ) : string
$context string
Результат string $value

get_billing_company() публичный Метод

Get billing_company.
public get_billing_company ( string $context = 'view' ) : string
$context string
Результат string

get_billing_country() публичный Метод

Get billing_country.
public get_billing_country ( string $context = 'view' ) : string
$context string
Результат string

get_billing_email() публичный Метод

Get billing_email.
public get_billing_email ( string $context = 'view' ) : string
$context string
Результат string

get_billing_first_name() публичный Метод

Get billing_first_name.
public get_billing_first_name ( string $context = 'view' ) : string
$context string
Результат string

get_billing_last_name() публичный Метод

Get billing_last_name.
public get_billing_last_name ( string $context = 'view' ) : string
$context string
Результат string

get_billing_phone() публичный Метод

Get billing_phone.
public get_billing_phone ( string $context = 'view' ) : string
$context string
Результат string

get_billing_postcode() публичный Метод

Get billing_postcode.
public get_billing_postcode ( string $context = 'view' ) : string
$context string
Результат string

get_billing_state() публичный Метод

Get billing_state.
public get_billing_state ( string $context = 'view' ) : string
$context string
Результат string

get_cancel_endpoint() публичный Метод

Helper method to return the cancel endpoint.
public get_cancel_endpoint ( ) : string
Результат string the cancel endpoint; either the cart page or the home page.

get_cancel_order_url() публичный Метод

Generates a URL so that a customer can cancel their (unpaid - pending) order.
public get_cancel_order_url ( string $redirect = '' ) : string
$redirect string
Результат string

get_cancel_order_url_raw() публичный Метод

Generates a raw (unescaped) cancel-order URL for use by payment gateways.
public get_cancel_order_url_raw ( string $redirect = '' ) : string
$redirect string
Результат string The unescaped cancel-order URL.

get_cart_hash() публичный Метод

Get cart hash.
public get_cart_hash ( string $context = 'view' ) : string
$context string
Результат string

get_checkout_order_received_url() публичный Метод

Generates a URL for the thanks page (order received).
public get_checkout_order_received_url ( ) : string
Результат string

get_checkout_payment_url() публичный Метод

Generates a URL so that a customer can pay for their (unpaid - pending) order. Pass 'true' for the checkout version which doesn't offer gateway choices.
public get_checkout_payment_url ( boolean $on_checkout = false ) : string
$on_checkout boolean
Результат string

get_created_via() публичный Метод

Get created_via.
public get_created_via ( string $context = 'view' ) : string
$context string
Результат string

get_customer_id() публичный Метод

Get customer_id.
public get_customer_id ( string $context = 'view' ) : integer
$context string
Результат integer

get_customer_ip_address() публичный Метод

Get customer_ip_address.
public get_customer_ip_address ( string $context = 'view' ) : string
$context string
Результат string

get_customer_note() публичный Метод

Get customer_note.
public get_customer_note ( string $context = 'view' ) : string
$context string
Результат string

get_customer_order_notes() публичный Метод

List order notes (public) for the customer.
public get_customer_order_notes ( ) : array
Результат array

get_customer_user_agent() публичный Метод

Get customer_user_agent.
public get_customer_user_agent ( string $context = 'view' ) : string
$context string
Результат string

get_data() публичный Метод

Get all class data in array format.
С версии: 2.7.0
public get_data ( ) : array
Результат array

get_date_completed() публичный Метод

Get date_completed.
public get_date_completed ( string $context = 'view' ) : integer
$context string
Результат integer

get_date_paid() публичный Метод

Get date_paid.
public get_date_paid ( string $context = 'view' ) : integer
$context string
Результат integer

get_formatted_billing_address() публичный Метод

Get a formatted billing address for the order.
public get_formatted_billing_address ( ) : string
Результат string

get_formatted_billing_full_name() публичный Метод

Get a formatted billing full name.
public get_formatted_billing_full_name ( ) : string
Результат string

get_formatted_order_total() публичный Метод

Gets order total - formatted for display.
public get_formatted_order_total ( string $tax_display = '', boolean $display_refunded = true ) : string
$tax_display string Type of tax display.
$display_refunded boolean If should include refunded value.
Результат string

get_formatted_shipping_address() публичный Метод

Get a formatted shipping address for the order.
public get_formatted_shipping_address ( ) : string
Результат string

get_formatted_shipping_full_name() публичный Метод

Get a formatted shipping full name.
public get_formatted_shipping_full_name ( ) : string
Результат string

get_item_count_refunded() публичный Метод

Gets the count of order items of a certain type that have been refunded.
С версии: 2.4.0
public get_item_count_refunded ( string $item_type = '' ) : string
$item_type string
Результат string

get_order_key() публичный Метод

Get order key.
С версии: 2.7.0
public get_order_key ( string $context = 'view' ) : string
$context string
Результат string

get_order_number() публичный Метод

Gets the order number for display (by default, order ID).
public get_order_number ( ) : string
Результат string

get_payment_method() публичный Метод

Get the payment method.
public get_payment_method ( string $context = 'view' ) : string
$context string
Результат string

get_payment_method_title() публичный Метод

Get payment_method_title.
public get_payment_method_title ( string $context = 'view' ) : string
$context string
Результат string

get_qty_refunded_for_item() публичный Метод

Get the refunded amount for a line item.
public get_qty_refunded_for_item ( integer $item_id, string $item_type = 'line_item' ) : integer
$item_id integer ID of the item we're checking
$item_type string type of the item we're checking, if not a line_item
Результат integer

get_refunds() публичный Метод

Get order refunds.
С версии: 2.2
public get_refunds ( ) : array
Результат array of WC_Order_Refund objects

get_remaining_refund_amount() публичный Метод

How much money is left to refund?
public get_remaining_refund_amount ( ) : string
Результат string

get_remaining_refund_items() публичный Метод

How many items are left to refund?
public get_remaining_refund_items ( ) : integer
Результат integer

get_shipping_address_1() публичный Метод

Get shipping_address_1.
public get_shipping_address_1 ( string $context = 'view' ) : string
$context string
Результат string

get_shipping_address_2() публичный Метод

Get shipping_address_2.
public get_shipping_address_2 ( string $context = 'view' ) : string
$context string
Результат string

get_shipping_address_map_url() публичный Метод

Get a formatted shipping address for the order.
public get_shipping_address_map_url ( ) : string
Результат string

get_shipping_city() публичный Метод

Get shipping_city.
public get_shipping_city ( string $context = 'view' ) : string
$context string
Результат string

get_shipping_company() публичный Метод

Get shipping_company.
public get_shipping_company ( string $context = 'view' ) : string
$context string
Результат string

get_shipping_country() публичный Метод

Get shipping_country.
public get_shipping_country ( string $context = 'view' ) : string
$context string
Результат string

get_shipping_first_name() публичный Метод

Get shipping_first_name.
public get_shipping_first_name ( string $context = 'view' ) : string
$context string
Результат string

get_shipping_last_name() публичный Метод

Get shipping_last_name.
public get_shipping_last_name ( string $context = 'view' ) : string
$context string
Результат string

get_shipping_postcode() публичный Метод

Get shipping_postcode.
public get_shipping_postcode ( string $context = 'view' ) : string
$context string
Результат string

get_shipping_state() публичный Метод

Get shipping_state.
public get_shipping_state ( string $context = 'view' ) : string
$context string
Результат string

get_tax_refunded_for_item() публичный Метод

Get the refunded amount for a line item.
public get_tax_refunded_for_item ( integer $item_id, integer $tax_id, string $item_type = 'line_item' ) : double
$item_id integer ID of the item we're checking
$tax_id integer ID of the tax we're checking
$item_type string type of the item we're checking, if not a line_item
Результат double

get_total_qty_refunded() публичный Метод

Get the total number of items refunded.
С версии: 2.4.0
public get_total_qty_refunded ( string $item_type = 'line_item' ) : integer
$item_type string type of the item we're checking, if not a line_item
Результат integer

get_total_refunded() публичный Метод

Get amount already refunded.
С версии: 2.2
public get_total_refunded ( ) : string
Результат string

get_total_refunded_for_item() публичный Метод

Get the refunded amount for a line item.
public get_total_refunded_for_item ( integer $item_id, string $item_type = 'line_item' ) : integer
$item_id integer ID of the item we're checking
$item_type string type of the item we're checking, if not a line_item
Результат integer

get_total_shipping_refunded() публичный Метод

Get the total shipping refunded.
С версии: 2.4
public get_total_shipping_refunded ( ) : float
Результат float

get_total_tax_refunded() публичный Метод

Get the total tax refunded.
С версии: 2.3
public get_total_tax_refunded ( ) : float
Результат float

get_total_tax_refunded_by_rate_id() публичный Метод

Get total tax refunded by rate ID.
public get_total_tax_refunded_by_rate_id ( integer $rate_id ) : float
$rate_id integer
Результат float

get_transaction_id() публичный Метод

Get transaction_id.
public get_transaction_id ( string $context = 'view' ) : string
$context string
Результат string

get_user() публичный Метод

Get the user associated with the order. False for guests.
public get_user ( ) : WP_User | false
Результат WP_User | false

get_user_id() публичный Метод

Alias for get_customer_id().
public get_user_id ( string $context = 'view' ) : integer
$context string
Результат integer

get_view_order_url() публичный Метод

Generates a URL to view an order from the my account page.
public get_view_order_url ( ) : string
Результат string

has_cart_hash() публичный Метод

See if order matches cart_hash.
public has_cart_hash ( $cart_hash = '' ) : boolean
Результат boolean

has_downloadable_item() публичный Метод

Returns true if the order contains a downloadable product.
public has_downloadable_item ( ) : boolean
Результат boolean

is_download_permitted() публичный Метод

Checks if product download is permitted.
public is_download_permitted ( ) : boolean
Результат boolean

is_editable() публичный Метод

Checks if an order can be edited, specifically for use on the Edit Order screen.
public is_editable ( ) : boolean
Результат boolean

is_paid() публичный Метод

Returns if an order has been paid for based on the order status.
С версии: 2.5.0
public is_paid ( ) : boolean
Результат boolean

key_is_valid() публичный Метод

Check if an order key is valid.
public key_is_valid ( mixed $key ) : boolean
$key mixed
Результат boolean

maybe_set_user_billing_email() защищенный Метод

Maybe set empty billing email to that of the user who owns the order.

needs_payment() публичный Метод

Checks if an order needs payment, based on status and order total.
public needs_payment ( ) : boolean
Результат boolean

needs_shipping_address() публичный Метод

Checks if an order needs display the shipping address, based on shipping method.
public needs_shipping_address ( ) : boolean
Результат boolean

payment_complete() публичный Метод

Most of the time this should mark an order as 'processing' so that admin can process/post the items. If the cart contains only downloadable items then the order is 'completed' since the admin needs to take no action. Stock levels are reduced at this point. Sales are also recorded for products. Finally, record the date of payment. Order must exist.
public payment_complete ( string $transaction_id = '' ) : boolean
$transaction_id string Optional transaction id to store in post meta.
Результат boolean success

save() публичный Метод

Save data to the database.
С версии: 2.7.0
public save ( ) : integer
Результат integer order ID

set_address_prop() защищенный Метод

Sets a prop for a setter method.
С версии: 2.7.0
protected set_address_prop ( string $prop, string $address = 'billing', mixed $value )
$prop string Name of prop to set.
$address string Name of address to set. billing or shipping.
$value mixed Value of the prop.

set_billing_address_1() публичный Метод

Set billing_address_1.
public set_billing_address_1 ( string $value )
$value string

set_billing_address_2() публичный Метод

Set billing_address_2.
public set_billing_address_2 ( string $value )
$value string

set_billing_city() публичный Метод

Set billing_city.
public set_billing_city ( string $value )
$value string

set_billing_company() публичный Метод

Set billing_company.
public set_billing_company ( string $value )
$value string

set_billing_country() публичный Метод

Set billing_country.
public set_billing_country ( string $value )
$value string

set_billing_email() публичный Метод

Set billing_email.
public set_billing_email ( string $value )
$value string

set_billing_first_name() публичный Метод

Set billing_first_name.
public set_billing_first_name ( string $value )
$value string

set_billing_last_name() публичный Метод

Set billing_last_name.
public set_billing_last_name ( string $value )
$value string

set_billing_phone() публичный Метод

Set billing_phone.
public set_billing_phone ( string $value )
$value string

set_billing_postcode() публичный Метод

Set billing_postcode.
public set_billing_postcode ( string $value )
$value string

set_billing_state() публичный Метод

Set billing_state.
public set_billing_state ( string $value )
$value string

set_cart_hash() публичный Метод

Set cart hash.
public set_cart_hash ( string $value )
$value string

set_created_via() публичный Метод

Set created_via.
public set_created_via ( string $value )
$value string

set_customer_id() публичный Метод

Set customer_id.
public set_customer_id ( integer $value )
$value integer

set_customer_ip_address() публичный Метод

Set customer_ip_address.
public set_customer_ip_address ( string $value )
$value string

set_customer_note() публичный Метод

Set customer_note.
public set_customer_note ( string $value )
$value string

set_customer_user_agent() публичный Метод

Set customer_user_agent.
public set_customer_user_agent ( string $value )
$value string

set_date_completed() публичный Метод

Set date_completed.
public set_date_completed ( string $timestamp )
$timestamp string

set_date_paid() публичный Метод

Set date_paid.
public set_date_paid ( string $timestamp )
$timestamp string

set_order_key() публичный Метод

Set order_key.
public set_order_key ( string $value )
$value string Max length 20 chars.

set_payment_method() публичный Метод

Set the payment method.
public set_payment_method ( string $payment_method = '' )
$payment_method string Supports WC_Payment_Gateway for bw compatibility with < 2.7

set_payment_method_title() публичный Метод

Set payment_method_title.
public set_payment_method_title ( string $value )
$value string

set_shipping_address_1() публичный Метод

Set shipping_address_1.
public set_shipping_address_1 ( string $value )
$value string

set_shipping_address_2() публичный Метод

Set shipping_address_2.
public set_shipping_address_2 ( string $value )
$value string

set_shipping_city() публичный Метод

Set shipping_city.
public set_shipping_city ( string $value )
$value string

set_shipping_company() публичный Метод

Set shipping_company.
public set_shipping_company ( string $value )
$value string

set_shipping_country() публичный Метод

Set shipping_country.
public set_shipping_country ( string $value )
$value string

set_shipping_first_name() публичный Метод

Set shipping_first_name.
public set_shipping_first_name ( string $value )
$value string

set_shipping_last_name() публичный Метод

Set shipping_last_name.
public set_shipping_last_name ( string $value )
$value string

set_shipping_postcode() публичный Метод

Set shipping_postcode.
public set_shipping_postcode ( string $value )
$value string

set_shipping_state() публичный Метод

Set shipping_state.
public set_shipping_state ( string $value )
$value string

set_status() публичный Метод

Set order status.
С версии: 2.7.0
public set_status ( string $new_status, string $note = '', boolean $manual_update = false )
$new_status string Status to change the order to. No internal wc- prefix is required.
$note string (default: '') Optional note to add.
$manual_update boolean is this a manual order status change?

set_transaction_id() публичный Метод

Set transaction_id.
public set_transaction_id ( string $value )
$value string

status_transition() защищенный Метод

Handle the status transition.
protected status_transition ( )

update_status() публичный Метод

Updates status of order immediately. Order must exist.
public update_status ( $new_status, $note = '', $manual = false ) : boolean
Результат boolean success

Описание свойств

$data защищенное свойство

Order Data array. This is the core order data exposed in APIs since 2.7.0.
С версии: 2.7.0
protected array $data
Результат array

$status_transition защищенное свойство

Stores data about status changes so relevant hooks can be fired.
protected bool|array $status_transition
Результат boolean | array