php - How to rename woocommerce order actions -


this question has answer here:

i rename wordpress woo-commerce orders actions processing order survey. not in wordpress. can 1 tell me how can achieve this. tried google giving me add customer order actions.

if want change display name have use wc_order_statuses filter.

here code:

function wh_process_to_survey($order_statuses) {     foreach ($order_statuses $key => $status)     {         if ('wc-processing' === $key)         {             $order_statuses[$key] = _x('survey', 'order status', 'woocommerce');         }     }     return $order_statuses; }  add_filter('wc_order_statuses', 'wh_process_to_survey', 10, 1); 

code goes in functions.php file of active child theme (or theme). or in plugin php files.
code tested , works.

hope helps!


Comments