Skip to main content

Stay Classy API Wrapper for Wordpress

··1 min

I wrote an API wrapper for Classy, as there was not anything really out there for what I needed at the time. It’s been open sourced over on my company’s Github. It works readily with Wordpress, but it can just be used in any PHP project as it is just a static class.

Check out the Classy API Wrapper.

Setup #

Add the classy-api directory to wp-content/plugins. (wp-content/plugins/classy-api)

Add your Classy Token and Classy Charity ID to your Wordpress wp-config.php file.

    define('CLASSY_TOKEN', 'xxxxxxxxxxxxxxxxxxxxx');
    define('CLASSY_CHARITY_ID', '00000');

Activate the plugin in your Wordpress Dashboard and you should be ready to start using the API.

StayClassy API documentation


Examples #

    Classy_API::get_campaigns(array('eid' => 000000));
    Classy_API::get_campaign(000000);
    Classy_API::get_campaign_tickets(000000);

Debugging #

In wp-config.php add the following:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);

Run this in a terminal to follow the debug logs

    tail -f /wp-content/debug.log
Neal Fennimore
Author
Neal Fennimore
Seasoned engineer with 15+ years delivering secure, automated CI/CD pipelines, cloud-native security controls, and compliance-by-design solutions for government and enterprise environments. Proven ability to embed SAST/DAST, SIEM, and Zero-Trust architectures into large-scale platforms while driving cost-effective automation and continuous monitoring. Holds a Master’s in Cybersecurity and multiple industry certifications.