Merge pull request #21270 from jessepearson/add/system-tools-action

Add action for when system tools are run
This commit is contained in:
Claudiu Lodromanean 2018-09-06 13:17:09 -07:00 committed by GitHub
commit 5ee82ce9c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -39,6 +39,22 @@ class WC_Admin_Status {
if ( array_key_exists( $action, $tools ) ) {
$response = $tools_controller->execute_tool( $action );
$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 );
} else {
$response = array(
'success' => false,