I added a custom WooCommerce status with the following code and want
function register_shipped_status() {
register_post_status( 'wc-shipped', array(
'label' => 'Shipped',
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'label_count' => _n_noop( 'Versendet <span class="count">(%s)</span>', 'Versendet <span class="count">(%s)</span>' )
) );
}
add_action( 'init', 'register_shipped_status' );
function add_shipped_to_order_statuses( $order_statuses ) {
$new_order_statuses = array();
// add new order status after processing
foreach ( $order_statuses as $key => $status ) {
$new_order_statuses[ $key ] = $status;
if ( 'wc-processing' === $key ) {
$new_order_statuses['wc-shipped'] = 'Versendet';
}
}
return $new_order_statuses;
}
add_filter( 'wc_order_statuses', 'add_shipped_to_order_statuses' );
This is working fine. The WooCommerce status is selectable, but I want the action button "completed" in the order list.
See screenshot:
Is there any way to add this WooCommerce button to all orders with my custom WooCommerce status?