Advertisement
fauzanjeg

For Ads Premium Users

Jan 12th, 2021
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. /* For Ads Premium Users */
  2. function remove_ads_for_premium_users () {
  3.     if ( get_user_option( 'jpw_subscribe_status', get_current_user_id() ) === 'ACTIVE' ) {
  4.         add_action( 'wp_head', function () {
  5.             ?>
  6.             <script>
  7.                 jQuery( window ).ready(() => {
  8.                     jQuery( '.jeg_ad ' ).remove()
  9.                 })
  10.             </script>
  11.             <?php
  12.         }, 99);
  13.     }
  14. }
  15.  
  16. add_action( 'init', 'remove_ads_for_premium_users' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement