Refactor extension updater to use multiple hooks.

Updated the `package_start` method to define separate hooks for 'start' and 'complete' package lifecycle events. This improves code clarity and prepares the updater for handling more specific actions in the future.
This commit is contained in:
Mykyta Synelnikov
2025-11-03 17:06:31 +02:00
parent fa0a8c43b1
commit c2da11ff0a
+4 -1
View File
@@ -42,7 +42,10 @@ class Extensions_Updater {
}
public function package_start( $version, $file_path, $delay, $per_page ) {
$hook = 'um_' . $this->updater_data['slug'] . '_package_complete';
$hooks = array(
'start' => 'um_' . $this->updater_data['slug'] . '_package_start',
'complete' => 'um_' . $this->updater_data['slug'] . '_package_complete',
);
include_once $file_path;
/**