File "SenderRegistrator.php"
Full Path: /home/jlklyejr/public_html/wp-content/test/wp-content/plugins/flexible-shipping/vendor_prefixed/octolize/wp-octolize-tracker/src/SenderRegistrator.php
File size: 786 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace FSVendor\Octolize\Tracker;
use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
/**
* Can create and register sender in filter.
*/
class SenderRegistrator implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
{
/**
* @var string
*/
private $plugin_slug;
/**
* @param string $plugin_slug
*/
public function __construct(string $plugin_slug)
{
$this->plugin_slug = $plugin_slug;
}
/**
* @return void
*/
public function hooks()
{
\add_filter('wpdesk/tracker/sender/' . $this->plugin_slug, [$this, 'create_sender']);
}
/**
* @return SenderToOctolize
*/
public function create_sender()
{
return new \FSVendor\Octolize\Tracker\SenderToOctolize();
}
}