This repository has been archived by the owner on May 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWoocommerceIR_SMS.php
executable file
·64 lines (56 loc) · 1.64 KB
/
WoocommerceIR_SMS.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Plugins Main File
*
* PHP version 5.6.x | 7.x | 8.x
*
* @category PLugins
* @package Wordpress
* @author Pejman Kheyri <[email protected]>
* @copyright 2021 All rights reserved.
*/
/*
Plugin Name: send sms via sms.ir
Version: 1.0.1
Description: send sms via sms.ir
Author: [email protected]
Contributors: pejmankheyri
WC requires at least: 3.0.0
WC tested up to: 5.0.0
*/
if (!defined('ABSPATH')) {
header('Location: https://github.com/pejmankheyri/SMSIR-Woocommerce');exit;
}
if (!defined('PS_WOO_SMS_VERSION'))
define('PS_WOO_SMS_VERSION', '1.0.1');
if (!defined('PS_WOO_SMS_PLUGIN_PATH'))
define('PS_WOO_SMS_PLUGIN_PATH', plugins_url('', __FILE__));
if (!defined('PS_WOO_SMS_PLUGIN_LIB_PATH'))
define('PS_WOO_SMS_PLUGIN_LIB_PATH', dirname(__FILE__). '/includes');
/**
* Uninstall Function
*
* @return void
*/
function woocommerceIRSMSProUninstall()
{
update_option('redirect_to_woo_sms_about_page', 'no');
update_option('redirect_to_woo_sms_about_page_check', 'no');
}
register_activation_hook(__FILE__, 'woocommerceIRSMSProUninstall');
register_deactivation_hook(__FILE__, 'woocommerceIRSMSProUninstall');
/**
* Adding File Resources
*
* @return void
*/
function woocommerceIRSMSIr()
{
global $persianwoosms;
include_once PS_WOO_SMS_PLUGIN_LIB_PATH. '/requirement.php';
include_once PS_WOO_SMS_PLUGIN_LIB_PATH. '/class.settings.php';
include_once PS_WOO_SMS_PLUGIN_LIB_PATH. '/class.gateways.php';
include_once PS_WOO_SMS_PLUGIN_LIB_PATH. '/class.bulk.send.php';
$persianwoosms = WoocommerceIR_Settings_SMS::init();
}
add_action('plugins_loaded', 'woocommerceIRSMSIr');