jQuery(document).ready(function($) {

	$(document).on('click', 'button.notice-dismiss', function () {
		var $notice = $(this).closest('.notice.is-dismissible');
		var noticeId = $notice.data('notice-id');
		if (!noticeId) return;

		jQuery.post(PostenBringCheckoutNotice.ajaxurl, {
			action: PostenBringCheckoutNotice.action,
			nonce: PostenBringCheckoutNotice.nonce,
			key: noticeId
		});
	});
})
