Inventory_Presser_Addon_Updater::init()

Set up WordPress filters to hook into WP’s update process.


Return

(void)


Source

File: includes/addon/class-addon-updater.php

		public function init() {
			add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
			add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
			remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
			add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
			add_action( 'admin_init', array( $this, 'show_changelog' ) );

			/**
			 * Changes "Automatic update is unavailable for this plugin." to
			 * "License key is missing at Vehicles → Options" if the problem is
			 * a missing license key for one of our add-ons.
			 */
			add_filter( 'site_transient_update_plugins', array( $this, 'show_missing_license_notice' ), 10, 2 );
		}