Notices::register()


Source

File: src/Tickets/Commerce/Admin/Notices.php

	public function register() {

		$notices = [
			[
				'event-tickets-tickets-commerce-checkout-not-set',
				[ $this, 'render_checkout_notice' ],
				[ 'dismiss' => false, 'type' => 'error' ],
				[ $this, 'should_render_checkout_notice' ],
			],
			[
				'event-tickets-tickets-commerce-success-not-set',
				[ $this, 'render_success_notice' ],
				[ 'dismiss' => false, 'type' => 'error' ],
				[ $this, 'should_render_success_notice' ],
			],
		];

		/**
		 * Filters admin notices.
		 *
		 * @since 5.3.2
		 *
		 * @param array[] $notices Array of admin notice parameters.
		 */
		$notices = apply_filters( 'tec_tickets_commerce_admin_notices', $notices );

		foreach ( $notices as $notice ) {
			call_user_func_array( 'tribe_notice', $notice );
		}
	}