Вот этот код (слегка измененный):
Код: Выделить всё
add_action( 'manage_posts_extra_tablenav', 'admin_order_list_top_bar_button', 20, 1 );
function admin_order_list_top_bar_button( $which ) {
global $typenow;
if ( 'shop_order' === $typenow && 'top' === $which ) {
?>
Подробнее здесь: [url]https://stackoverflow.com/questions/56380632/run-a-function-on-custom-button-click-in-woocommerce-admin-order-list-hpos[/url]
Мобильная версия