O:39:"phpDocumentor\Descriptor\FileDescriptor":22:{s:7:" * hash";s:32:"e00256b21da7d36710cee7765b6db78d";s:7:" * path";s:21:"php/class-notices.php";s:9:" * source";s:2236:"<?php
/**
 * Notices Class.
 *
 * @since	1.3.0
 *
 * @package dtg\gift_aid_for_woocommerce
 */

namespace dtg\gift_aid_for_woocommerce;

/**
 * Class Notices
 *
 * Generates various plugin notices, including on activation.
 *
 * @since	1.3.0
 *
 * @package dtg\gift_aid_for_woocommerce
 */
class Notices {

	/**
	 * Path to the root plugin file.
	 *
	 * @var 	string
	 * @access	private
	 * @since	1.3.0
	 */
	private $plugin_root;

	/**
	 * Plugin name.
	 *
	 * @var 	string
	 * @access	private
	 * @since	1.3.0
	 */
	private $plugin_name;

	/**
	 * Plugin prefix.
	 *
	 * @var 	string
	 * @access	private
	 * @since	1.3.0
	 */
	private $plugin_prefix;

	/**
	 * Constructor
	 *
	 * @since	1.3.0
	 */
	function __construct() {
		$this->plugin_root 		 = DTG_GIFT_AID_ROOT;
		$this->plugin_name		 = DTG_GIFT_AID_NAME;
		$this->plugin_prefix     = DTG_GIFT_AID_PREFIX;
	}

	/**
	 * Unleash Hell.
	 *
	 * @since	1.3.0
	 */
	public function run() {
		// Hook in specific functionality such as adding notices etc.
		add_action( 'admin_notices', array( $this, 'display_activation_notices' ), 10 );
	}

	/**
	 * Display notice(s) on plugin activation.
	 *
	 * @since	1.3.0
	 */
	public function display_activation_notices() {

		// Does the activation transient exist?
		if ( ! empty( get_transient( $this->plugin_prefix . '_activated' ) ) ) {

			$activation_notices = array();

			// Add a successful activation notice.
			$activation_text      = __( sprintf( '%s is now active and can be configured in the Products tab of your WooCommerce settings.', $this->plugin_name ), 'gift-aid-for-woocommerce' );
			$activation_notice    = apply_filters( $this->plugin_prefix . '_activation_notice', $activation_text );
			$activation_notices[] = $activation_notice;

			// Have we got any notices to display?
			if ( ! empty( $activation_notices ) ) {

				// Loop through the array and generate the notices.
				foreach ( $activation_notices as $notice ) {
					echo '<div class="updated notice is-dismissible"><p>' . esc_html( $notice ) . '</p></div>';
				}
			}

			// Delete the activated/deactivated transients.
			delete_transient( $this->plugin_prefix . '_activated' );
			delete_transient( $this->plugin_prefix . '_deactivated' );
		}
	}
}
";s:19:" * namespaceAliases";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:11:" * includes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:12:" * constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:12:" * functions";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:10:" * classes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:37:"\dtg\gift_aid_for_woocommerce\Notices";O:40:"phpDocumentor\Descriptor\ClassDescriptor":19:{s:9:" * parent";s:0:"";s:13:" * implements";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:11:" * abstract";b:0;s:8:" * final";b:0;s:12:" * constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:13:" * properties";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:11:"plugin_root";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":16:{s:9:" * parent";r:15;s:8:" * types";N;s:10:" * default";N;s:9:" * static";b:0;s:13:" * visibility";s:7:"private";s:8:" * fqsen";s:50:"\dtg\gift_aid_for_woocommerce\Notices::plugin_root";s:7:" * name";s:11:"plugin_root";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:29:"Path to the root plugin file.";s:14:" * description";s:0:"";s:17:" * fileDescriptor";N;s:7:" * line";i:30;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":5:{s:15:" * variableName";s:0:"";s:8:" * types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:" * name";s:3:"var";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:6:"access";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:" * name";s:6:"access";s:14:" * description";s:7:"private";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:5:"since";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\SinceDescriptor":4:{s:10:" * version";s:5:"1.3.0";s:7:" * name";s:5:"since";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:19:" * inheritedElement";N;}s:11:"plugin_name";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":16:{s:9:" * parent";r:15;s:8:" * types";N;s:10:" * default";N;s:9:" * static";b:0;s:13:" * visibility";s:7:"private";s:8:" * fqsen";s:50:"\dtg\gift_aid_for_woocommerce\Notices::plugin_name";s:7:" * name";s:11:"plugin_name";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:12:"Plugin name.";s:14:" * description";s:0:"";s:17:" * fileDescriptor";N;s:7:" * line";i:39;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":5:{s:15:" * variableName";s:0:"";s:8:" * types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:" * name";s:3:"var";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:6:"access";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:" * name";s:6:"access";s:14:" * description";s:7:"private";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:5:"since";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\SinceDescriptor":4:{s:10:" * version";s:5:"1.3.0";s:7:" * name";s:5:"since";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:19:" * inheritedElement";N;}s:13:"plugin_prefix";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":16:{s:9:" * parent";r:15;s:8:" * types";N;s:10:" * default";N;s:9:" * static";b:0;s:13:" * visibility";s:7:"private";s:8:" * fqsen";s:52:"\dtg\gift_aid_for_woocommerce\Notices::plugin_prefix";s:7:" * name";s:13:"plugin_prefix";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:14:"Plugin prefix.";s:14:" * description";s:0:"";s:17:" * fileDescriptor";N;s:7:" * line";i:48;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":5:{s:15:" * variableName";s:0:"";s:8:" * types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:" * name";s:3:"var";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:6:"access";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:" * name";s:6:"access";s:14:" * description";s:7:"private";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:5:"since";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\SinceDescriptor":4:{s:10:" * version";s:5:"1.3.0";s:7:" * name";s:5:"since";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:19:" * inheritedElement";N;}}}s:10:" * methods";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:11:"__construct";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:" * parent";r:15;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:52:"\dtg\gift_aid_for_woocommerce\Notices::__construct()";s:7:" * name";s:11:"__construct";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:11:"Constructor";s:14:" * description";s:0:"";s:17:" * fileDescriptor";N;s:7:" * line";i:55;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:5:"since";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\SinceDescriptor":4:{s:10:" * version";s:5:"1.3.0";s:7:" * name";s:5:"since";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:19:" * inheritedElement";N;}s:3:"run";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:" * parent";r:15;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:44:"\dtg\gift_aid_for_woocommerce\Notices::run()";s:7:" * name";s:3:"run";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:13:"Unleash Hell.";s:14:" * description";s:0:"";s:17:" * fileDescriptor";N;s:7:" * line";i:66;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:5:"since";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\SinceDescriptor":4:{s:10:" * version";s:5:"1.3.0";s:7:" * name";s:5:"since";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:19:" * inheritedElement";N;}s:26:"display_activation_notices";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:" * parent";r:15;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:67:"\dtg\gift_aid_for_woocommerce\Notices::display_activation_notices()";s:7:" * name";s:26:"display_activation_notices";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:39:"Display notice(s) on plugin activation.";s:14:" * description";s:0:"";s:17:" * fileDescriptor";N;s:7:" * line";i:76;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:5:"since";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\SinceDescriptor":4:{s:10:" * version";s:5:"1.3.0";s:7:" * name";s:5:"since";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:19:" * inheritedElement";N;}}}s:13:" * usedTraits";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:37:"\dtg\gift_aid_for_woocommerce\Notices";s:7:" * name";s:7:"Notices";s:12:" * namespace";s:29:"\dtg\gift_aid_for_woocommerce";s:10:" * package";s:28:"dtg\gift_aid_for_woocommerce";s:10:" * summary";s:13:"Class Notices";s:14:" * description";s:58:"Generates various plugin notices, including on activation.";s:17:" * fileDescriptor";r:1;s:7:" * line";i:21;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:5:"since";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\SinceDescriptor":4:{s:10:" * version";s:5:"1.3.0";s:7:" * name";s:5:"since";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:7:"package";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:" * name";s:7:"package";s:14:" * description";s:28:"dtg\gift_aid_for_woocommerce";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:10:"subpackage";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:19:" * inheritedElement";N;}}}s:13:" * interfaces";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * traits";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:10:" * markers";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:0:"";s:7:" * name";s:17:"class-notices.php";s:12:" * namespace";N;s:10:" * package";s:28:"dtg\gift_aid_for_woocommerce";s:10:" * summary";s:14:"Notices Class.";s:14:" * description";s:0:"";s:17:" * fileDescriptor";N;s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:5:"since";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\SinceDescriptor":4:{s:10:" * version";s:5:"1.3.0";s:7:" * name";s:5:"since";s:14:" * description";s:0:"";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:7:"package";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:" * name";s:7:"package";s:14:" * description";s:28:"dtg\gift_aid_for_woocommerce";s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:10:"subpackage";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:19:" * inheritedElement";N;}