Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
test
/
wp-content
/
plugins
/
flexible-shipping
/
vendor_prefixed
/
octolize
/
wp-octolize-tracker
/
src
:
SenderRegistrator.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?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(); } }