Woocommerce add custom button to backend order table

@mmm thanks for that code, I didnt know this filter yet. Do you know if it is also possible to add a tooltip that way?

Anyway, I have a different solution to add a new button to this column, and also want to post it:

add_action( 'woocommerce_admin_order_actions_end', 'add_content_to_wcactions_column' );
function add_content_to_wcactions_column() {

    // create some tooltip text to show on hover
    $tooltip = __('Some tooltip text here.', 'textdomain');

    // create a button label
    $label = __('Label', 'textdomain');

    echo '<a class="button tips custom-class" href="#" data-tip="'.$tooltip.'">'.$label.'</a>';
}

Just replace the tooltip and label text and add your url in the link.


I tested the above code on an empty installation and this is what I get:
enter image description here

Leave a Comment