First, I made a custom column.
function add_example_column($columns) {
$columns['EXAMPLE'] = 'EXAMPLE';
return $columns;
}
add_filter( 'manage_edit-shop_order_columns', 'add_example_column' );
After, I made a new action.
function example_action($actions) {
$actions['example'] = array (
'url' => 'https://example.com?action=ups',
'name' => __( 'Some text', 'woocommerce' ),
'action' => 'example'
);
return $actions;
}
add_action( 'woocommerce_admin_order_actions', 'example_action', 10, 1 );
Then, I tried to put this action button to custom column.
function example_barcode($column, $order_id) {
$order = new WC_Order( $order_id );
if ( $column == 'EXAMPLE') :
if ( $order->has_status( array( 'processing' ) ) ) :
echo '<style>.wc-action-button-ups::after { font-family: FontAwesome !important; content: "\f7e0" !important; }</style>';
endif;
endif;
}
add_action( 'manage_shop_order_posts_custom_column', 'example_barcode', 10, 2 );
Still no success.