Automattic\WooCommerce\Internal\Admin\Orders
ListTable::extra_tablenav
Extra controls to be displayed between bulk actions and pagination.
Method of the class: ListTable{}
Hooks from the method
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->extra_tablenav( $which );
- $which(string) (required)
- Either 'top' or 'bottom'.
ListTable::extra_tablenav() ListTable::extra tablenav code WC 10.3.6
protected function extra_tablenav( $which ) {
echo '<div class="alignleft actions">';
if ( 'top' === $which ) {
ob_start();
$this->months_filter();
/**
* Fires before the "Filter" button on the list table for orders and other order types.
*
* @since 7.3.0
*
* @param string $order_type The order type.
* @param string $which The location of the extra table nav: 'top' or 'bottom'.
*/
do_action( 'woocommerce_order_list_table_restrict_manage_orders', $this->order_type, $which );
$output = ob_get_clean();
if ( ! empty( $output ) ) {
echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
submit_button( __( 'Filter', 'woocommerce' ), '', 'filter_action', false, array( 'id' => 'order-query-submit' ) );
}
}
if ( $this->is_trash && $this->has_items() && current_user_can( 'edit_others_shop_orders' ) ) {
submit_button( __( 'Empty Trash', 'woocommerce' ), 'apply', 'delete_all', false );
}
/**
* Fires immediately following the closing "actions" div in the tablenav for the order
* list table.
*
* @since 7.3.0
*
* @param string $order_type The order type.
* @param string $which The location of the extra table nav: 'top' or 'bottom'.
*/
do_action( 'woocommerce_order_list_table_extra_tablenav', $this->order_type, $which );
echo '</div>';
}