"$patreon_gate = Patreon_Frontend::gate_custom_content( $patreon_custom_gate_level )" test not working for my patrons

This is a bit frustrating, as it works for me, but not my patrons. I’m using the suggested PHP

> <script type="text/javascript">
> <?php
>   $patreon_custom_gate_level = 3; // 3 = $3
>   if ( $patreon_gate = Patreon_Frontend::gate_custom_content( $patreon_custom_gate_level ) ) {
>       ?>
> 	  	var patreonSub = false;
>       <?php
>   }
>   else {
>       ?>
> 	  var patreonSub = true;
>       <?php
>   }
> ?>
> </script>

Then I test for patreonSub in my javascript. And if I’m logged in, the “patreonSub = true” works and my javascript returns the correct stuff. If I’m not logged in the “patreonSub = false” works and my javascript returns the correct stuff.

BUT, for my patrons, who have subscribed at the $3 level attempt, it doesn’t work. They get the info for “patreonSub = false”.

I’ve attempted to search this forum and the web in general, but can’t seem to find a solution.

Is there anyway for me to see the site as my patrons see it for testing purposes? Should checking for $3 actually be a test for $2?

Any thoughts on where I’m going wrong?

Thank you in advance.

The patron must be logged into WordPress via the patron’s Patreon account.

Thank you. I sorted out part of it since that post 8 days ago. (I needed to include a “Log in with Patron” link.)

I now need to sort out what code to add to the URI page to make the magic work.

1 Like