Restrict content not working on Firefox and IOS

Hello,

I am trying to restrict content to only Patreons on my website. I have the pluging ready but it does not seem to recognize the Patrons on Firefox or even worse on iPhones (80% of my traffic).

This is my code, that is displaying the right message to Patrons on google chrome.

So for patreons i should have:
image

And for non patreons that:
image

However on Firefox/Safari ios even for logged in Patrons u see the wrong message.

As on chrome it’s working well i assume the issue is not with the code… but let me know.

Maybe i should replace the custom button i have with the “Login with Patreon” button? How do i do that without shortcode (for some reason the shortcodes in PHP are not recognized in this theme)?

Thank you

This the page where i do the testing if you want to check by yourself.

I am placing the php snippet just under the table.


<?php

// Replace 7 with the $ value at or over which you want to hide ad. Any patron with this or higher pledge level will not see ads
$patreon_tier = 1;
                
$patreon_cta = <<<EOD
<h3 style="color:white; font-family:gagalin; padding: 5px;">Find in this section some awesome details about the gun:</h3>
<p style="color:white; font-family:Alata;">
	- Pros &amp; cons</br>
	- What playstyle this gun is the best suited for?</br>
	- Which gun should you pair it with?</br>
</p>
<a href='https://www.patreon.com/warzone_loadout' target="_blank">
	<button style="
    background-color: #FFFFFF;
    border-radius: 5px;
    border-color: #FFFFFF ;
    border:none;
    padding: 5px 5px;
    text-align: center;
    font-family: gagalin;
    font-size: 12px;
    Color:#ff424d;">🚀 Unlock premium features & remove ads 🚀</button></a>
EOD;
// There should be no space before above line!

$patreon_show = Patreon_Frontend::hide_ad_for_patrons( $patreon_tier, $patreon_cta );

if ( $patreon_show != '' ) {
        echo $patreon_show;
}
else {
?>
 <!-- If you have any content which you want to show to patrons who wont see ads, paste it below -->
<h3 style="color:white; font-family:gagalin; padding: 5px;">THIS IS A TEST CONTENT for PATREON only</h3>
 <!-- If you have any content which you want to show to patrons who wont see ads, paste it above -->
<?php                        
        
}
?>

Yes, that unlock button wont unlock anything since it just goes to a page at your site. You must inject your button image in place of the original button’s image using filters:

ptrn/final_state_universal_button

The above filter should fill your need. Just replace whatever comes in from that filter totally with your banner image. But the image only - not anything else.

Thank you for your answer!

I actually found another way while browsing your website, and created a new topic for another issue i have :wink:

Thank you very much for your help, it’s very appreciated!

Sincerely,
Alex

1 Like