Skip to content

Instantly share code, notes, and snippets.

View bhubbard's full-sized avatar
:octocat:
Hello

Brandon Hubbard bhubbard

:octocat:
Hello
View GitHub Profile
@crtag
crtag / hubspot-workflow-create-company.js
Last active October 13, 2020 05:52
Hubspot workflow Node JS webhook to create a company record via API call.
// TODO: configure your own hubspot client
/**
* This webhook is triggered by Hubspot workflow and receives a full Hubspot contact object
* to create the company for. It does expect company name property, but will default
* company name to contact `${firstname} ${lastname} construct
*
*/
module.exports = async (req, res) => {
@bhubbard
bhubbard / ajax_class.php
Created September 18, 2021 02:45 — forked from sfgarza/ajax_class.php
Boilerplate code for making AJAX calls to wordpress.
<?php
if (!defined('ABSPATH')) {
exit;
}
class ajax_class
{
public function __construct()
{
//Hook = 'wp_ajax_{$action}' where $action must equal the AJAX request's 'action' property.