Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Created December 3, 2019 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseeproductions/7059cc269a933df1d68dc4c3dcbc5fe8 to your computer and use it in GitHub Desktop.
Save jesseeproductions/7059cc269a933df1d68dc4c3dcbc5fe8 to your computer and use it in GitHub Desktop.
HubSpot Clear Plugin
<?php
/*
Plugin Name: HubSpot Clear Plugin
Plugin URI: http://tri.be
Version: .5
Activate the plugin to clear the HubSpot Delivery Queue.
Deactivate the plugin immediately after it has been activated.
Author: Brian Jessee
Author URI: http://tri.be
Text Domain: tribe
Domain Path: /languages/
License: GPL2
*/
add_action( 'admin_footer', 'hubspot_clear_queue' );
function hubspot_clear_queue() {
$queue = new \Tribe\HubSpot\Process\Delivery_Queue();
$queue->delete_all_queues( 'hubspot_delivery_queue' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment