diff --git a/includes/class-wc-geolocation.php b/includes/class-wc-geolocation.php index 4f1cfca83fa..84d4c53d2fb 100644 --- a/includes/class-wc-geolocation.php +++ b/includes/class-wc-geolocation.php @@ -47,6 +47,7 @@ class WC_Geolocation { */ public static function init() { add_action( 'woocommerce_geoip_updater', array( __CLASS__, 'update_database' ) ); + add_action( 'woocommerce_installed', array( __CLASS__, 'update_database' ) ); } /** diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index 8d1d99a519e..e1db0246bf5 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -160,7 +160,6 @@ class WC_Install { wp_clear_scheduled_hook( 'woocommerce_scheduled_sales' ); wp_clear_scheduled_hook( 'woocommerce_cancel_unpaid_orders' ); wp_clear_scheduled_hook( 'woocommerce_cleanup_sessions' ); - wp_clear_scheduled_hook( 'woocommerce_language_pack_updater_check' ); wp_clear_scheduled_hook( 'woocommerce_geoip_updater' ); wp_clear_scheduled_hook( 'woocommerce_tracker_send_event' ); @@ -175,8 +174,6 @@ class WC_Install { } wp_schedule_event( time(), 'twicedaily', 'woocommerce_cleanup_sessions' ); - wp_schedule_single_event( time(), 'woocommerce_language_pack_updater_check' ); - wp_schedule_single_event( time(), 'woocommerce_geoip_updater' ); wp_schedule_event( strtotime( 'first tuesday of next month' ), 'monthly', 'woocommerce_geoip_updater' ); wp_schedule_event( time(), apply_filters( 'woocommerce_tracker_event_recurrence', 'daily' ), 'woocommerce_tracker_send_event' ); } diff --git a/includes/class-wc-language-pack-upgrader.php b/includes/class-wc-language-pack-upgrader.php index d8fb7a824d3..85750382c68 100644 --- a/includes/class-wc-language-pack-upgrader.php +++ b/includes/class-wc-language-pack-upgrader.php @@ -30,7 +30,7 @@ class WC_Language_Pack_Upgrader { public function __construct() { add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_for_update' ) ); add_filter( 'upgrader_pre_download', array( $this, 'version_update' ), 10, 2 ); - add_action( 'woocommerce_language_pack_updater_check', array( $this, 'has_available_update' ) ); + add_action( 'woocommerce_installed', array( $this, 'has_available_update' ) ); add_filter( 'admin_init', array( $this, 'manual_language_update' ), 999 ); }