Add action for when system tools are run

This commit is contained in:
Jesse Pearson 2018-09-04 09:33:16 -04:00
parent dc55b9b002
commit 2faadce24f
1 changed files with 16 additions and 0 deletions

View File

@ -51,6 +51,22 @@ class WC_Admin_Status {
} else {
echo '<div class="error inline"><p>' . esc_html( $response['message'] ) . '</p></div>';
}
$tool = $tools[ $action ];
$tool = array(
'id' => $action,
'name' => $tool['name'],
'action' => $tool['button'],
'description' => $tool['desc'],
);
$tool = array_merge( $tool, $response );
/**
* Fires after a WooCommerce system status tool has been executed.
*
* @param array $tool Details about the tool that has been executed.
*/
do_action( 'woocommerce_system_status_tool_executed', $tool );
}
// Display message if settings settings have been saved.