Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
EventEspresso Invoice Style
<?php
namespace Academy\Core\Hooks\Filters;
use Academy\Core\Hooks\Filters;
class EventEspressoInvoiceStyle extends Filters
{
public function __construct()
{
parent::__construct('FHEE__EE_Messages_Template_Pack__get_variation', 10, 8);
}
public function callback($cssFile)
{
$newCss = get_stylesheet_directory_uri().'/assets/css/'.strtolower(PLUGIN_PREFIX).'_invoices.css';
return $newCss;
}
}
<?php
namespace Academy\Core\Hooks;
class Filters
{
private $hookName = '';
public function __construct($hookName)
{
$this->hookName = $hookName;
$this->register();
}
public function register()
{
add_filter($this->hookName, [$this, 'callback'], 10, 3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment