Errors when implementing paper

I’m using this Dropbox paper to implement a way to hide ads for users at $3 or more:

https://www.dropbox.com/scl/fi/9spl5hqv6d55gb3vxbyru/Patreon-WordPress-how-to-lock-any-part-of-your-Website.paper?rlkey=zr3qdxi5g5sp83c6kbrqc92bt&dl=0

The errors:

Warning : Attempt to read property “ID” on bool in /nas/content/live/steamdeckhq/wp-content/plugins/patreon-connect/classes/patreon_wordpress.php on line 1584

Warning : Attempt to read property “ID” on bool in /nas/content/live/steamdeckhq/wp-content/plugins/patreon-connect/classes/patreon_wordpress.php on line 1587

Warning : Attempt to read property “ID” on bool in /nas/content/live/steamdeckhq/wp-content/plugins/patreon-connect/classes/patreon_wordpress.php on line 1584

Warning : Attempt to read property “ID” on bool in /nas/content/live/steamdeckhq/wp-content/plugins/patreon-connect/classes/patreon_wordpress.php on line 1587

The code:

<?php

  $patreon_custom_gate_level = 3; // Replace 7 with the $ value which you want to gate this content with - without the $ sign

  if ( $patreon_gate = Patreon_Frontend::gate_custom_content( $patreon_custom_gate_level ) ) {
      echo $patreon_gate;
  }
  else {
      ?>
         <div id="mediavine-settings" data-blocklist-leaderboard="1" data-blocklist-sidebar-atf="1" data-blocklist-sidebar-btf="1" data-blocklist-content-desktop="1" data-blocklist-content-mobile="1" data-blocklist-adhesion-mobile="1" data-blocklist-adhesion-tablet="1" data-blocklist-adhesion-desktop="1" data-blocklist-recipe="1" data-blocklist-auto-insert-sticky="1" data-blocklist-in-image="1" data-blocklist-chicory="1" data-blocklist-zergnet="1" data-blocklist-interstitial-mobile="1" data-blocklist-interstitial-desktop="1" data-blocklist-universal-player-desktop="1" data-blocklist-universal-player-mobile="1" ></div>
      <?php
  }
        
?>

Any idea why this is throwing errors? It doesn’t seem to work at all.

Nevermind, figured it out using this paper instead:

https://www.dropbox.com/scl/fi/mc2p4rhkvktglex6pdnfh/Patreon-WordPress-How-to-hide-ads-for-patrons.paper?rlkey=ompiqmqlab6giwtoqjt2rye0j&dl=0

You may be attempting to get the ID of a user or something on a false return. (likely WP user id). Make a check for the false return if there is one and then try getting the id.