| 1 |
<?php |
| 2 |
|
| 3 |
namespace StoreEngine\Addons\Csv; |
| 4 |
|
| 5 |
use StoreEngine\Addons\Csv\Ajax\Export; |
| 6 |
use StoreEngine\Addons\Csv\Ajax\Import; |
| 7 |
use StoreEngine\Addons\Csv\ThirdParty\Rcp; |
| 8 |
use StoreEngine\Classes\AbstractAddon; |
| 9 |
use StoreEngine\Traits\Singleton; |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
final class Csv extends AbstractAddon { |
| 16 |
|
| 17 |
use Singleton; |
| 18 |
|
| 19 |
protected string $addon_name = 'csv'; |
| 20 |
|
| 21 |
public function define_constants() { |
| 22 |
define( 'STOREENGINE_CSV_VERSION', '1.0' ); |
| 23 |
define( 'STOREENGINE_CSV_DIR_PATH', STOREENGINE_ADDONS_DIR_PATH . 'csv/' ); |
| 24 |
} |
| 25 |
|
| 26 |
public function init_addon() { |
| 27 |
Hooks::init(); |
| 28 |
|
| 29 |
// ajax actions. |
| 30 |
( new Export() )->dispatch_actions(); |
| 31 |
( new Import() )->dispatch_actions(); |
| 32 |
( new Rcp() )->dispatch_actions(); |
| 33 |
} |
| 34 |
|
| 35 |
} |
| 36 |
|