woocommerce_(order_type)_list_table_default_statuses filter-hookWC 7.3.0

Allows 3rd parties to set the default list of statuses for a given order type.

Usage

add_filter( 'woocommerce_(order_type)_list_table_default_statuses', 'wp_kama_woocommerce_order_type_list_table_default_statuses_filter' );

/**
 * Function for `woocommerce_(order_type)_list_table_default_statuses` filter-hook.
 * 
 * @param string[] $statuses Statuses.
 *
 * @return string[]
 */
function wp_kama_woocommerce_order_type_list_table_default_statuses_filter( $statuses ){

	// filter...
	return $statuses;
}
$statuses(string[])
Statuses.

Changelog

Since 7.3.0 Introduced.

Where the hook is called

ListTable::set_status_args()
woocommerce_(order_type)_list_table_default_statuses
woocommerce/src/Internal/Admin/Orders/ListTable.php 511-517
$status = apply_filters(
	'woocommerce_' . $this->order_type . '_list_table_default_statuses',
	array_intersect(
		array_keys( wc_get_order_statuses() ),
		get_post_stati( array( 'show_in_admin_all_list' => true ), 'names' )
	)
);

Where the hook is used in WooCommerce

Usage not found.