Hide Deal Reg Button from Group

PHOTO EMBED

Sat Jan 08 2022 04:05:57 GMT+0000 (UTC)

Saved by @rebukt #javascript

jQuery(document).ready(function ($) {
 
 
  var isLoggedIn = !!$(".logged-in").length;
 
  function visibilityDriver() {
    for (scenario of visScenarios) {
      if (scenario.condition) {
        scenario.outcome();
      }
    }
  }
 
  var visScenarios = [
    {
      condition: isLoggedIn && abUser.group_id.indexOf("1791") > -1,
      outcome: function () {
        $("a.deal_reg").hide();
      },
    },
  ];
 
  visibilityDriver();
 
  
});
content_copyCOPY

Request: Hide the 'Register a Deal' button from members of group 1791