• Resolved jnicklasson

    (@jnicklasson)


    I want to apply a filter like this:

    add_filter( 'popmake_popup_is_loadable', 'popup_load_referralCheck', 10, 2 );
    function popup_load_referralCheck( $is_loadable, $popup_id ) {
        if( $popup_id == 3629 ) {
            return ! empty( $_GET['popexperience'] );
        }
    
        return $is_loadable;
    }

    But I can’t for the life of me figure out WHERE?
    And what if I need more filters to trigger other popups?

    https://wordpress.org/plugins/popup-maker/

Viewing 1 replies (of 1 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @jnicklasson – That filter will still work but we have deprecated it and replaced it with pum_popup_is_loadable, should be the same other than that, but will prevent your error logs from filling with deprecated function notices.

    If you have a child theme set up I would add it to your themes functions.php. If not I would look at https://wordpress.org/plugins/my-custom-functions/ or similar.

    As for filtering additional popups you simply add another if ( $popup_id == # ) {} block for the next ID in the same filter function.

    Hope that helps.

Viewing 1 replies (of 1 total)

The topic ‘Where do I apply filter code?’ is closed to new replies.