In the WCFM dashboard, vendors can see the details of their orders on the WCFM dashboard’s order page.

By default, the order status is displayed as an icon. Hence for many sellers, it’s difficult to understand the order condition at first glance.

Here’s a default look at WCFM order status on sellers dashboard:

show order status label on wcfm order page ss1

But it would much helpful to show the order status as a text label for easier visualization.

We will guide you through the process of showing order status labels on the WCFM seller order page.

Show Order Status Label on WCFM Dashboard

Here’s the simple snippet code that will show the order status as a text label on WCFM order page:

/**
* @snippet Show Order Status Label on WCFM Order Page
* @source https://www.wptechnic.com/?p=7716
* @compatible WC 6.3.1
*/
add_filter( 'wcfm_order_status_display', function( $label, $the_order ) {
$label .= '<br />' . wc_get_order_status_name( $the_order->get_status() );
return '<span class="wcfm-order-status wcfm-order-status">' . $label . '</span>';
}, 50, 2 );

That’s it! With this code, the order status on the WCFM seller order page will now be displayed as a label instead of an icon.

You can style the label using CSS by targeting the CSS class “.wcfm-order-status” and adding your custom styles. You can also customize the label further by modifying the PHP code as needed.

Hence it will look like this –

show order status label on wcfm order page ss2

Conclusion

Adding order status labels to the WCFM seller order page is a simple process that can make it easier for vendors to see the status of their orders. By using custom PHP code, you can easily modify the display of the order status on the WCFM dashboard to fit your needs.

Did this code work for your website? Or you’re having difficulties? Either way, let me know by leaving a comment below right now.

Avatar for Muhammad Tamzid
Author

Muhammad Tamzid, the founder of WPTechnic, is a WordPress Enthusiast with a passion to help beginners learning WordPress. Also managing WPrevival, a 24/7 WordPress Website Development, Maintenance & Security Service company.

Write A Comment