38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: Price Updates
|
|
* Description: Update price for products
|
|
* Version: 1.0.0
|
|
* Requires PHP: 8.0
|
|
* Author: Good Projects
|
|
*
|
|
* @package price-updates
|
|
*/
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
|
|
define("PRICE_UPDATES_VERSION", "1.0.0");
|
|
define("PRICE_UPDATES_PLUGIN_DIR", __DIR__);
|
|
define("PRICE_UPDATES_PLUGIN_URL", plugin_dir_url(__FILE__));
|
|
|
|
use Cosmopet\PriceUpdates\RestApi;
|
|
use Cosmopet\PriceUpdates\Admin\Menu;
|
|
|
|
use Cosmopet\PriceUpdates\Parser\GoogleTableParser;
|
|
|
|
class PriceUpdates {
|
|
public function __construct() {
|
|
// Инициализация меню и страниц в админ панели
|
|
Menu::init();
|
|
|
|
// Регистрация rest api контроллеров
|
|
RestApi::register();
|
|
|
|
// Инициализируем парсер гугл-таблиц (клиента и сервиса для работы с ней)
|
|
GoogleTableParser::init();
|
|
}
|
|
}
|
|
|
|
new PriceUpdates(); |