This file contains hidden or 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
<?php | |
add_filter('woocommerce_order_actions', 'wc_regenerate_and_notify_custom_order_action'); | |
function wc_regenerate_and_notify_custom_order_action( $actions ) { | |
// Remove the woocommerce option to regenerate to avoid confusion | |
unset($actions['regenerate_download_permissions']); | |
// Add our new action (executed below) | |
$actions['wc_regenerate_and_notify'] = __('Regenerate permissions & send link to customer', 'wc-regenerate-and-notify'); | |
return $actions; |