Hello,
Yes, you can modify the text of order statuses in WooCommerce. To do this, you’ll need to add some custom code to your theme’s functions.php
file. For best practices, I recommend using a child theme to ensure your changes are preserved after theme updates.
You can use WooCommerce’s order status hook to modify the text. Here’s an example function to change the text of the ‘Pending payment’ status:
add_filter( 'wc_order_statuses', 'custom_wc_order_status' );function custom_wc_order_status( $order_statuses ) {
// Change the text of the 'Pending payment' order status
$order_statuses['wc-pending'] = 'custom text';
return $order_statuses;
}
You can change any of the default WooCommerce order statuses using this method. Here are the default order statuses you can customize:
- Pending payment (
wc-pending
)
- Processing (
wc-processing
)
- On hold (
wc-on-hold
)
- Completed (
wc-completed
)
- Cancelled (
wc-cancelled
)
- Refunded (
wc-refunded
)
- Failed (
wc-failed
)
Feel free to replace 'custom text'
with any text you prefer for the order status.
Best,