Last active
May 15, 2019 18:58
-
-
Save CrispDev/8cbdd9aaa816e6471158edc610216e2a to your computer and use it in GitHub Desktop.
Autoship Customization // Customize Order Status Nicenames
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment