public function init()
{
global $wpdb;
// Setup termmeta table and hooks only once
if (!empty($wpdb->termmeta)) {
return;
}
$wpdb->termmeta = $wpdb->prefix . 'termmeta';
self::create_table();
// Delete all meta associated with the deleted term
add_action('delete_term', array(__CLASS__, 'on_delete_term'), 10, 3);
}