| 1 |
<?php |
| 2 |
/** |
| 3 |
* |
| 4 |
* Plugin Name: Moloni |
| 5 |
* Plugin URI: https://plugins.moloni.com/woocommerce |
| 6 |
* Description: A forma mais fácil de ligar a sua loja online com a sua faturação. |
| 7 |
* Version: 3.0.49 |
| 8 |
* Author: moloni.pt |
| 9 |
* Author URI: https://moloni.pt |
| 10 |
* License: GPL2 |
| 11 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 12 |
* |
| 13 |
*/ |
| 14 |
|
| 15 |
namespace Moloni; |
| 16 |
|
| 17 |
if (!defined('ABSPATH')) { |
| 18 |
exit; |
| 19 |
} |
| 20 |
|
| 21 |
$composer_autoloader = __DIR__ . '/vendor/autoload.php'; |
| 22 |
if (is_readable($composer_autoloader)) { |
| 23 |
/** @noinspection PhpIncludeInspection */ |
| 24 |
require $composer_autoloader; |
| 25 |
} |
| 26 |
|
| 27 |
if (!defined('MOLONI_PLUGIN_FILE')) { |
| 28 |
define('MOLONI_PLUGIN_FILE', __FILE__); |
| 29 |
} |
| 30 |
|
| 31 |
if (!defined('MOLONI_DIR')) { |
| 32 |
define('MOLONI_DIR', __DIR__); |
| 33 |
} |
| 34 |
|
| 35 |
if (!defined('MOLONI_TEMPLATE_DIR')) { |
| 36 |
define('MOLONI_TEMPLATE_DIR', __DIR__ . '/src/Templates/'); |
| 37 |
} |
| 38 |
|
| 39 |
if (!defined('MOLONI_PLUGIN_URL')) { |
| 40 |
define('MOLONI_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| 41 |
} |
| 42 |
|
| 43 |
if (!defined('MOLONI_IMAGES_URL')) { |
| 44 |
define('MOLONI_IMAGES_URL', plugin_dir_url(__FILE__) . 'images/'); |
| 45 |
} |
| 46 |
|
| 47 |
register_activation_hook(__FILE__, '\Moloni\Activators\Install::run'); |
| 48 |
register_deactivation_hook(__FILE__, '\Moloni\Activators\Remove::run'); |
| 49 |
|
| 50 |
add_action('plugins_loaded', Start::class); |
| 51 |
add_action('admin_enqueue_scripts', '\Moloni\Plugin::defines'); |
| 52 |
|
| 53 |
function Start() |
| 54 |
{ |
| 55 |
return new \Moloni\Plugin(); |
| 56 |
} |