I am creating a wordpress site that will periodically retrieve data from an API and use that data to update info in the wp_users table.

I don't really know how to go about this. I'll start with 2 questions:

  1. The API can return batch data. If I make a batch call, is there a way to update all the users at once?**

  2. Say I want to make the API call once an hour when the site is live. How do I set that up? I tried to search but I don't even know if I am googling the right words.**

Thank you!

1 Answer 1

  1. You can use wp->query calls to loop through the users table and update each row in a loop.
  2. Probably would need to use cron jobs for this, this is different for every host but you basically would tell it to run your php script at intervals.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.