Add action for when system tools are run
This commit is contained in:
parent
dc55b9b002
commit
2faadce24f
|
@ -51,6 +51,22 @@ class WC_Admin_Status {
|
||||||
} else {
|
} else {
|
||||||
echo '<div class="error inline"><p>' . esc_html( $response['message'] ) . '</p></div>';
|
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.
|
// Display message if settings settings have been saved.
|
||||||
|
|
Loading…
Reference in New Issue