WC_Admin_List_Table_Orders
extends WC_Admin_List_Table
in package
WC_Admin_List_Table_Orders Class.
Table of Contents
- $list_table_type : string
- Post type.
- $object : object|null
- Object being shown on the row.
- $orders_list_table : ListTable
- The data store-agnostic list table implementation (introduced to support custom order tables), which we use here to render columns.
- __construct() : mixed
- Constructor.
- add_custom_query_var() : array<string|int, mixed>
- Query vars for custom searches.
- bulk_admin_notices() : mixed
- Show confirmation message that order status changed for number of orders.
- default_hidden_columns() : array<string|int, mixed>
- Adjust which columns are displayed by default.
- define_bulk_actions() : array<string|int, mixed>
- Define bulk actions.
- define_columns() : array<string|int, mixed>
- Define which columns to show on this screen.
- define_sortable_columns() : array<string|int, mixed>
- Define which columns are sortable.
- disable_view_mode() : array<string|int, mixed>
- Removes this type from list of post types that support "View Mode" switching.
- get_order_preview_actions_html() : string
- Get actions to display in the preview as HTML.
- get_order_preview_item_html() : string
- Get items to display in the preview as HTML.
- handle_bulk_actions() : string
- Handle bulk actions.
- list_table_primary_column() : string
- Set list table primary column.
- maybe_render_blank_state() : mixed
- Show blank slate.
- order_preview_get_order_details() : array<string|int, mixed>
- Get order details to send to the ajax endpoint for previews.
- order_preview_template() : mixed
- Template for order preview.
- render_columns() : mixed
- Render individual columns.
- request_query() : array<string|int, mixed>
- Handle any filters.
- restrict_manage_posts() : mixed
- See if we should render search filters or not.
- row_actions() : array<string|int, mixed>
- Set row actions.
- search_custom_fields() : mixed
- Search custom fields as well as content.
- search_label() : string
- Change the label when searching orders.
- define_hidden_columns() : array<string|int, mixed>
- Define hidden columns.
- get_primary_column() : string
- Define primary column.
- get_row_actions() : array<string|int, mixed>
- Get row actions to show in the list table.
- prepare_row_data() : mixed
- Pre-fetch any data for the row each column has access to it. the_order global is there for bw compat.
- query_filters() : array<string|int, mixed>
- Handle any custom filters.
- render_billing_address_column() : mixed
- Render column: billing_address.
- render_blank_state() : mixed
- Render blank state.
- render_filters() : mixed
- Render any custom filters and search inputs for the list table.
- render_order_date_column() : mixed
- Render column: order_date.
- render_order_number_column() : mixed
- Render column: order_number.
- render_order_status_column() : mixed
- Render column: order_status.
- render_order_total_column() : mixed
- Render column: order_total.
- render_shipping_address_column() : mixed
- Render column: shipping_address.
- render_wc_actions_column() : mixed
- Render column: wc_actions.
Properties
$list_table_type
Post type.
protected
string
$list_table_type
= 'shop_order'
$object
Object being shown on the row.
protected
object|null
$object
=
ull
$orders_list_table
The data store-agnostic list table implementation (introduced to support custom order tables), which we use here to render columns.
private
ListTable
$orders_list_table
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixed —add_custom_query_var()
Query vars for custom searches.
public
add_custom_query_var(mixed $public_query_vars) : array<string|int, mixed>
Parameters
- $public_query_vars : mixed
-
Array of query vars.
Return values
array<string|int, mixed> —bulk_admin_notices()
Show confirmation message that order status changed for number of orders.
public
bulk_admin_notices() : mixed
Return values
mixed —default_hidden_columns()
Adjust which columns are displayed by default.
public
default_hidden_columns(array<string|int, mixed> $hidden, object $screen) : array<string|int, mixed>
Parameters
- $hidden : array<string|int, mixed>
-
Current hidden columns.
- $screen : object
-
Current screen.
Return values
array<string|int, mixed> —define_bulk_actions()
Define bulk actions.
public
define_bulk_actions(array<string|int, mixed> $actions) : array<string|int, mixed>
Parameters
- $actions : array<string|int, mixed>
-
Existing actions.
Return values
array<string|int, mixed> —define_columns()
Define which columns to show on this screen.
public
define_columns(array<string|int, mixed> $columns) : array<string|int, mixed>
Parameters
- $columns : array<string|int, mixed>
-
Existing columns.
Return values
array<string|int, mixed> —define_sortable_columns()
Define which columns are sortable.
public
define_sortable_columns(array<string|int, mixed> $columns) : array<string|int, mixed>
Parameters
- $columns : array<string|int, mixed>
-
Existing columns.
Return values
array<string|int, mixed> —disable_view_mode()
Removes this type from list of post types that support "View Mode" switching.
public
disable_view_mode(array<string|int, mixed> $post_types) : array<string|int, mixed>
View mode is seen on posts where you can switch between list or excerpt. Our post types don't support it, so we want to hide the useless UI from the screen options tab.
Parameters
- $post_types : array<string|int, mixed>
-
Array of post types supporting view mode.
Return values
array<string|int, mixed> — Array of post types supporting view mode, without this type.get_order_preview_actions_html()
Get actions to display in the preview as HTML.
public
static get_order_preview_actions_html(WC_Order $order) : string
Parameters
- $order : WC_Order
-
Order object.
Return values
string —get_order_preview_item_html()
Get items to display in the preview as HTML.
public
static get_order_preview_item_html(WC_Order $order) : string
Parameters
- $order : WC_Order
-
Order object.
Return values
string —handle_bulk_actions()
Handle bulk actions.
public
handle_bulk_actions(string $redirect_to, string $action, array<string|int, mixed> $ids) : string
Parameters
- $redirect_to : string
-
URL to redirect to.
- $action : string
-
Action name.
- $ids : array<string|int, mixed>
-
List of ids.
Return values
string —list_table_primary_column()
Set list table primary column.
public
list_table_primary_column(string $default, string $screen_id) : string
Parameters
- $default : string
-
Default value.
- $screen_id : string
-
Current screen ID.
Return values
string —maybe_render_blank_state()
Show blank slate.
public
maybe_render_blank_state(string $which) : mixed
Parameters
- $which : string
-
String which tablenav is being shown.
Return values
mixed —order_preview_get_order_details()
Get order details to send to the ajax endpoint for previews.
public
static order_preview_get_order_details(WC_Order $order) : array<string|int, mixed>
Parameters
- $order : WC_Order
-
Order object.
Return values
array<string|int, mixed> —order_preview_template()
Template for order preview.
public
order_preview_template() : mixed
Tags
Return values
mixed —render_columns()
Render individual columns.
public
render_columns(string $column, int $post_id) : mixed
Parameters
- $column : string
-
Column ID to render.
- $post_id : int
-
Post ID being shown.
Return values
mixed —request_query()
Handle any filters.
public
request_query(array<string|int, mixed> $query_vars) : array<string|int, mixed>
Parameters
- $query_vars : array<string|int, mixed>
-
Query vars.
Return values
array<string|int, mixed> —restrict_manage_posts()
See if we should render search filters or not.
public
restrict_manage_posts() : mixed
Return values
mixed —row_actions()
Set row actions.
public
row_actions(array<string|int, mixed> $actions, WP_Post $post) : array<string|int, mixed>
Parameters
- $actions : array<string|int, mixed>
-
Array of actions.
- $post : WP_Post
-
Current post object.
Return values
array<string|int, mixed> —search_custom_fields()
Search custom fields as well as content.
public
search_custom_fields(WP_Query $wp) : mixed
Parameters
- $wp : WP_Query
-
Query object.
Return values
mixed —search_label()
Change the label when searching orders.
public
search_label(mixed $query) : string
Parameters
- $query : mixed
-
Current search query.
Return values
string —define_hidden_columns()
Define hidden columns.
protected
define_hidden_columns() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_primary_column()
Define primary column.
protected
get_primary_column() : string
Return values
string —get_row_actions()
Get row actions to show in the list table.
protected
get_row_actions(array<string|int, mixed> $actions, WP_Post $post) : array<string|int, mixed>
Parameters
- $actions : array<string|int, mixed>
-
Array of actions.
- $post : WP_Post
-
Current post object.
Return values
array<string|int, mixed> —prepare_row_data()
Pre-fetch any data for the row each column has access to it. the_order global is there for bw compat.
protected
prepare_row_data(int $post_id) : mixed
Parameters
- $post_id : int
-
Post ID being shown.
Return values
mixed —query_filters()
Handle any custom filters.
protected
query_filters(array<string|int, mixed> $query_vars) : array<string|int, mixed>
Parameters
- $query_vars : array<string|int, mixed>
-
Query vars.
Return values
array<string|int, mixed> —render_billing_address_column()
Render column: billing_address.
protected
render_billing_address_column() : mixed
Return values
mixed —render_blank_state()
Render blank state.
protected
render_blank_state() : mixed
Return values
mixed —render_filters()
Render any custom filters and search inputs for the list table.
protected
render_filters() : mixed
Return values
mixed —render_order_date_column()
Render column: order_date.
protected
render_order_date_column() : mixed
Return values
mixed —render_order_number_column()
Render column: order_number.
protected
render_order_number_column() : mixed
Return values
mixed —render_order_status_column()
Render column: order_status.
protected
render_order_status_column() : mixed
Return values
mixed —render_order_total_column()
Render column: order_total.
protected
render_order_total_column() : mixed
Return values
mixed —render_shipping_address_column()
Render column: shipping_address.
protected
render_shipping_address_column() : mixed
Return values
mixed —render_wc_actions_column()
Render column: wc_actions.
protected
render_wc_actions_column() : mixed