diff --git a/public_html/wp-content/plugins/camptix/addons/require-login.php b/public_html/wp-content/plugins/camptix/addons/require-login.php
index 67111d711..53f4141cb 100644
--- a/public_html/wp-content/plugins/camptix/addons/require-login.php
+++ b/public_html/wp-content/plugins/camptix/addons/require-login.php
@@ -123,7 +123,7 @@ public function ticket_form_message() {
}
// Warn users that they will need to login to purchase a ticket
- if ( ! is_user_logged_in() && ! $this->user_is_editing_ticket() ) {
+ if ( ! is_user_logged_in() && $camptix->has_tickets_available() && ! $this->user_is_editing_ticket() ) {
$camptix->notice( apply_filters(
'camptix_require_login_please_login_message',
sprintf(
diff --git a/public_html/wp-content/plugins/camptix/camptix.php b/public_html/wp-content/plugins/camptix/camptix.php
index f40992a29..f28a1164f 100644
--- a/public_html/wp-content/plugins/camptix/camptix.php
+++ b/public_html/wp-content/plugins/camptix/camptix.php
@@ -8586,6 +8586,15 @@ public function is_wordcamp_closed() {
$wordcamp = get_wordcamp_post();
return 'wcpt-closed' === $wordcamp->post_status;
}
+
+ /**
+ * Return whether there are available tickets.
+ *
+ * @return bool
+ */
+ public function has_tickets_available() {
+ return $this->number_available_tickets() > 0;
+ }
}
// Initialize the $camptix global.