Native UI: Change Scheduled Order Status Nicenames

In this example a developer changes the nice-names Scheduled Order statuses displayed to customers when using the Native UI display option.

Remember: Always test new code on a staging site before adding it to you live site

Code Example:

/**
* Filter the Status names displayed in the Native Scheduled Order dashboard and order detail page.
* @param array $statuses The current status and it's display name.
* @return array
*/
function xx_adjust_autoship_status_nicenames( $statuses ){

  // Optionally use autoship_rights_checker() to determine which version of nicenames to display
  return array (
    'Active'  => 'Scheduled',
    'Locked'  => 'Processing',
    'Pending' => 'Pending',
    'Failed'  => 'Order Failed',
    'Paused'  => 'Being Fulfilled',
    'Deleted' => 'No Longer Valid',
  );

}
add_filter( 'autoship_get_scheduled_order_status_nicenames', 'xx_adjust_autoship_status_nicenames', 10, 1 );

Result: