Automattic\WooCommerce\Internal\Admin\Orders
ListTable::render_order_status_column()
Renders the order status.
Method of the class: ListTable{}
No Hooks.
Return
null
. Nothing (null).
Usage
$ListTable = new ListTable(); $ListTable->render_order_status_column( $order ): void;
- $order(WC_Order) (required)
- The order object for the current row.
ListTable::render_order_status_column() ListTable::render order status column code WC 9.6.1
public function render_order_status_column( WC_Order $order ): void { /* translators: %s: order status label */ $tooltip = wc_sanitize_tooltip( $this->get_order_status_label( $order ) ); // Gracefully handle legacy statuses. if ( in_array( $order->get_status(), array( 'trash', 'draft', 'auto-draft' ), true ) ) { $status_name = ( get_post_status_object( $order->get_status() ) )->label; } else { $status_name = wc_get_order_status_name( $order->get_status() ); } if ( $tooltip ) { printf( '<mark class="order-status %s tips" data-tip="%s"><span>%s</span></mark>', esc_attr( sanitize_html_class( 'status-' . $order->get_status() ) ), wp_kses_post( $tooltip ), esc_html( $status_name ) ); } else { printf( '<mark class="order-status %s"><span>%s</span></mark>', esc_attr( sanitize_html_class( 'status-' . $order->get_status() ) ), esc_html( $status_name ) ); } }