51 linhas
2,3 KiB
PHP
51 linhas
2,3 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: Interweb Angola SMS Center
|
|
* Description: SMS for WordPress and WooCommerce: order alerts for your customers and for you, SMS to customers from the dashboard, test sends and an activity log. Uses only the public API, with your key.
|
|
* Version: 1.0.1
|
|
* Requires at least: 6.0
|
|
* Requires PHP: 7.4
|
|
* Plugin URI: https://git.interweb.ao/interweb-ao/wordpress-sms-center-plugin
|
|
* Author: Interweb Angola
|
|
* Author URI: https://www.interweb.ao
|
|
* License: MIT
|
|
* License URI: https://opensource.org/licenses/MIT
|
|
* Text Domain: interweb-ao-sms-center
|
|
* Domain Path: /languages
|
|
* WC requires at least: 7.0
|
|
* WC tested up to: 11.3
|
|
*/
|
|
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
define('INTERWEB_AO_SMS_CENTER_VERSION', '1.0.1');
|
|
define('INTERWEB_AO_SMS_CENTER_FILE', __FILE__);
|
|
define('INTERWEB_AO_SMS_CENTER_DIR', plugin_dir_path(__FILE__));
|
|
define('INTERWEB_AO_SMS_CENTER_URL', plugin_dir_url(__FILE__));
|
|
define('INTERWEB_AO_SMS_CENTER_SLUG', 'interweb-ao-sms-center');
|
|
|
|
require_once INTERWEB_AO_SMS_CENTER_DIR . 'includes/class-i18n.php';
|
|
require_once INTERWEB_AO_SMS_CENTER_DIR . 'includes/class-brands.php';
|
|
require_once INTERWEB_AO_SMS_CENTER_DIR . 'includes/class-crypto.php';
|
|
require_once INTERWEB_AO_SMS_CENTER_DIR . 'includes/class-settings.php';
|
|
require_once INTERWEB_AO_SMS_CENTER_DIR . 'includes/class-api.php';
|
|
require_once INTERWEB_AO_SMS_CENTER_DIR . 'includes/class-log.php';
|
|
require_once INTERWEB_AO_SMS_CENTER_DIR . 'includes/class-sms.php';
|
|
require_once INTERWEB_AO_SMS_CENTER_DIR . 'includes/class-woo.php';
|
|
require_once INTERWEB_AO_SMS_CENTER_DIR . 'includes/class-admin.php';
|
|
|
|
// WooCommerce: this plugin works with the order tables (HPOS) and with the cart and checkout blocks.
|
|
add_action('before_woocommerce_init', function () {
|
|
if (class_exists('\Automattic\WooCommerce\Utilities\FeaturesUtil')) {
|
|
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', INTERWEB_AO_SMS_CENTER_FILE, true);
|
|
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('cart_checkout_blocks', INTERWEB_AO_SMS_CENTER_FILE, true);
|
|
}
|
|
});
|
|
|
|
INTERWEB_AO_SMS_CENTER_I18n::init();
|
|
INTERWEB_AO_SMS_CENTER_Woo::init();
|
|
if (is_admin()) {
|
|
INTERWEB_AO_SMS_CENTER_Admin::init();
|
|
}
|