Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Last active December 12, 2023 18:34
Show Gist options
  • Save kjohnson/a05959c2ebc4123ebbb82f7917b61e70 to your computer and use it in GitHub Desktop.
Save kjohnson/a05959c2ebc4123ebbb82f7917b61e70 to your computer and use it in GitHub Desktop.
GiveWP Donor Dashboard Custom Tab
<?php
namespace App;
class CustomTab extends \Give\DonorDashboards\Tabs\Contracts\Tab
{
public static function id() {
return 'custom-tab';
}
public function routes() {
return [
MyCustomTabRoute::class, // Must extend \Give\DonorDashboards\Tabs\Contracts\Route
];
}
public function enqueueAssets()
{
// Enqueue assets here
}
}
<?php
add_action('init', function() {
(new \App\CustomTab)->registerTab();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment