get_licenser(); if ( is_null( $licenser ) ) { return; } $inactive_addons = $licenser->get_addon_list()->get_inactive_addons(); foreach ( $inactive_addons as $inactive_addon ) { $license_key = $licenser->get_addon_license_key( $inactive_addon->name ); $updater = new EDDUpdater( $email_log->get_store_url(), $inactive_addon->file, array( 'version' => $inactive_addon->get_version(), 'license' => $license_key, 'item_name' => $inactive_addon->name, 'author' => $inactive_addon->author, ) ); $licenser->add_updater( $updater ); } } /** * Add version attribute to plugin API response. * * The API response generated by EDD doesn't have the version attribute and it results in some warnings. * This method fixes it by manually adding the version attribute to the API response. * * @since 2.1.0 * * @param object $response API Response. * @param string $action Action name. * @param array $args Arguments for the function. * * @return object Modified API response. */ public function add_version_to_plugin_api_response( $response, $action, $args ) { if ( 'plugin_information' !== $action ) { return $response; } if ( ! isset( $args->slug ) || ( substr( $args->slug, 0, 10 ) != 'email-log-' ) ) { return $response; } if ( isset( $response->version ) ) { return $response; } if ( ! isset( $response->new_version ) ) { return $response; } $response->version = $response->new_version; return $response; } }