메소드 |
설명 |
|
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. |
|