query_vars, $home_url ); if($this_page_url != $home_url . '?page&pagename=my-account'){ return; } $user = wp_get_current_user(); // Loop through user subscriptions foreach ( wcs_get_users_subscriptions($user->ID) as $subscription ) { if($subscription->has_status( 'active' )){ echo_subscription_info($subscription); } } } function echo_subscription_info($subscription){ $subscription_id = $subscription->ID; $domain = get_field('domain', $subscription_id); $domain_status = get_field('domain_status', $subscription_id); $provision_status = get_field('provision_status', $subscription_id); $initial_admin_password = get_field('initial_admin_password', $subscription_id); $tier = get_subscription_tier($subscription); if(!empty($domain) && $provision_status === 'provisioned'){ echo '
'; echo '
'; echo '

Apps for: ' . $domain . '

'; echo '

Click here to access your apps. Also, check out our helpful articles here for tips and tutorials on how to use these amazing open source tools.

'; if($domain_status === 'default'){ echo '

This is a default domain, please do not change your admin password until you have switched to your custom domain.

'; } echo '

Admin Username: admin@' . $domain . ' \\ Initial Admin Password: ' . $initial_admin_password . '

'; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; } else if($provision_status === 'needs_provision' || $provision_status === 'provisioning') { echo '
'; echo '
'; echo '

Welcome To Federated, Your Core is being provisioned as we speak.

'; echo '

Your Federated Core is your very own, we provision each one made-to-order. Your apps, on your server, without having to share with anyone else. This only takes about 5 - 10 minutes, please check back shortly.

'; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; } } add_action( 'woocommerce_account_provision-info_endpoint', 'federated_provision_info_content' ); // Note: add_action must follow 'woocommerce_account_{your-endpoint-slug}_endpoint' format