| @@ -70,10 +70,11 @@ | ||
| 70 | 70 | * @param mixed $output result. |
| 71 | 71 | * @param string $type action type. |
| 72 | 72 | * @param mixed $post_data post data (option). |
| 73 | 73 | * @param bool $upload true|false: install by upload (option). |
| 74 | + * @param bool $is_auto_update true|false: is auto update (option). | |
| 74 | 75 | */ |
| 75 | - public function do_action_mainwp_install_actions( $websites, $pAction, $output, $type, $post_data = array(), $upload = false ) { | |
| 76 | + public function do_action_mainwp_install_actions( $websites, $pAction, $output, $type, $post_data = array(), $upload = false, $is_auto_update = false ) { | |
| 76 | 77 | |
| 77 | 78 | if ( ! in_array( $pAction, array( 'install', 'updated' ), true ) ) { |
| 78 | 79 | return; |
| 79 | 80 | } |
| @@ -95,14 +96,18 @@ | ||
| 95 | 96 | $data['install_items'] = $output->other_data[ $website->id ]['install_items']; |
| 96 | 97 | } |
| 97 | 98 | } |
| 98 | 99 | |
| 100 | + if ( 'updated' === $pAction && $is_auto_update ) { | |
| 101 | + MainWP_Updates_Report_Manager::save_update_info( $website, $data, $type ); | |
| 102 | + } | |
| 103 | + | |
| 99 | 104 | /** |
| 100 | 105 | * Fires immediately after install action. |
| 101 | 106 | * |
| 102 | 107 | * @since 4.5.1.1 |
| 103 | 108 | */ |
| 104 | - do_action( 'mainwp_install_update_actions', $website, $pAction, $data, $type, $post_data, $upload ); | |
| 109 | + do_action( 'mainwp_install_update_actions', $website, $pAction, $data, $type, $post_data, $upload, $is_auto_update ); | |
| 105 | 110 | } |
| 106 | 111 | |
| 107 | 112 | /** |
| 108 | 113 | * |