WC_Notes_Run_Db_Update::__construct()

Attach hooks.


Description Description


Source Source

File: includes/admin/notes/class-wc-notes-run-db-update.php

	public function __construct() {
		// If the old notice gets dismissed, also hide this new one.
		add_action( 'woocommerce_hide_update_notice', array( __CLASS__, 'set_notice_actioned' ) );

		// Not using Jetpack\Constants here as it can run before 'plugin_loaded' is done.
		if ( defined( 'DOING_AJAX' ) && DOING_AJAX
			|| defined( 'DOING_CRON' ) && DOING_CRON
			|| ! is_admin() ) {
			return;
		}

		add_action( 'current_screen', array( __CLASS__, 'show_reminder' ) );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.