As part of the application process, you’ve been requested to complete the following challenge. If you have any questions please respond to the last email you received from our team.
Using the GET accessible endpoint https://cspf-dev-challenge.herokuapp.com/ (there are no parameters to/from required), create an AJAX endpoint in WordPress that:
- Can be used when logged out or in;
- Calls the above endpoint to get the data to return;
- Which when called always returns the data, but regardless of when/how many times it is called should never request the data from our server more than 1 time per hour.
- Create a WP CLI command that can be used to force the refresh of this data the next time the AJAX endpoint is called;
- Create a WordPress admin page which displays this data in the style of the admin page of the WordPress plugin MemberPress (you can download the MemberPress logo assets here) and add a button to refresh the data.
- Organize & package the code as a WordPress plugin zip file
Ensure to properly escape, sanitize and validate data in each step as appropriate using built in PHP and WordPress functions.
The code you submit should not be built from a boilerplate.