Get a list of trial sites

I am wondering if I can call the get_all_trial_blogs() function that is in the Registration.php file somehow. I am looking for a way to get a list of blog ids that are still in trial and it looks like this does it.



  • Uttam Kumar
    • Site Builder, Child of Zeus

    Hey Greg ,

    I hope you are doing well today and thank you for your question!

    You have to check if the class exists, but before that you have to wait that all plugin are loaded: no one can assure that your plugin is loaded after Pro sites.

    For run a code from plugin when all plugin are loaded hook into plugins_loaded hook.

    Be aware that you cannot use this hook in a theme, because when theme load that hook was already fired.

    add_action('plugins_loaded', 'prosite_get_trial_blog_list_fn');

    function prosite_get_trial_blog_list_fn() {
    if ( class_exists('ProSites_Helper_Registration') ) {
    $blog_ids = ProSites_Helper_Registration::get_all_trial_blogs();
    // do what ever you want with $blog_ids


    If there is anything else we can help you with let is know.

    Kind Regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.