jQuery("body").on("click", '#optical-store-welcome-notice .notice-dismiss', function (event) {
    event.preventDefault();

    jQuery.ajax({
      type: 'POST',
      url: ajaxurl,
      data: {
          action: 'optical_store_dismissed_notice',
          nonce: personalTutorNotice.nonce,
      },
      success: function () {
          // Remove the notice on success
          $('.notice[data-notice="example"]').remove();
      }
    });
  }
)