Support QuestionsCategory: Terms Popup On User LoginCan I show the popup to a only subset of users
Lehel Matyus asked 8 months ago
Is it possible to show the popup only to users that get migrated from a different website.

1 Answers
Lehel Matyus answered 8 months ago


Thank you for contacting me. Glad to hear you are thinking about using my plugin.

If you only need to show the popup for migrated users or old users etc. I think the best way to achieve that is using the custom hook to show the plugin for them.

This is a premium feature, you will need a license key for this.

function YOUR_CUSTOM_FUNCTION_show_popup($should_show_popup) {

    // should_show_popup - is the original value based on active options
    // EXTRA_CONDITION is an example variable that you can set

    $EXTRA_CONDITION = false; // add your custom logic

    if ($should_show_popup && $EXTRA_CONDITION) {
        return true;
    } else {
        return false;
add_filter('tpul_override_show_popup', 'YOUR_CUSTOM_FUNCTION_show_popup');

Use extra conditions to differentiate between user group.

I would tag users to be imported with a value in the user profile, then write a function like above and only return true in the filter if the user has that extra condition.

This filter overrides any settings you have in the plugin.

As long as you can differentiate in code between the two sets of users just return true on the ones you want the plugins to show.

Please function in your functions.php file.

BE SURE TO do a backup of your site before you make any changes in code.

I hope this helps