I have this filter which works fine from the frontend. The only problem is that I display the div as text in the wordpress backend admin panel.
https://i.stack.imgur.com/jupjS.png
Is there any way to hide that div only in the backend? Or do I have to choose another way to modify the css of each state? How can I do ?
Sorry but I'm new, thanks for any reply.
// Rinomina gli stati degli ordini da frontend
add_filter( 'wc_order_statuses', 'ts_rename_order_status_msg', 20, 1 );
function ts_rename_order_status_msg( $order_statuses ) {
$order_statuses['wc-completed'] = _x( '<div class="status success">Acquistato</div>', 'Order status', 'woocommerce' );
$order_statuses['wc-processing'] = _x( '<div class="status processing">In Elaborazione</div>', 'Order status', 'woocommerce' );
$order_statuses['wc-on-hold'] = _x( '<div class="status waiting">In Attesa</div>', 'Order status', 'woocommerce' );
$order_statuses['wc-pending'] = _x( '<div class="status suspended">Sospeso</div>', 'Order status', 'woocommerce' );
return $order_statuses;
}