-
Notifications
You must be signed in to change notification settings - Fork 0
/
wc-webpayplus-woocommerce.php
54 lines (48 loc) · 1.52 KB
/
wc-webpayplus-woocommerce.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
<?php
/**
* Plugin Name: Webpay Plus for WooCommerce Payment Gateway
* Plugin URI: https://andres.reyes.tech/plugins/wc-webpayplus-woocommerce-uri/
* Description: Easily add Webpay Plus Webservices on your WooCommerce store.
* Version: 0.0.1
* Author: AndresReyesTech
* Author URI: https://andres.reyes.tech/
* License: GPL-2.0+
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: wc-webpayplus-woocommerce
* Domain Path: /languages
*/
namespace WC_WebpayPlus_Webservices;
// If this file is called directly, abort.
if (!defined('WPINC')) {
die;
}
// The class that contains the plugin info.
require_once plugin_dir_path(__FILE__) . 'includes/class-info.php';
/**
* The code that runs during plugin activation.
*/
function activation() {
require_once plugin_dir_path(__FILE__) . 'includes/class-activator.php';
Activator::activate();
}
register_activation_hook(__FILE__, __NAMESPACE__ . '\\activation');
/**
* Check for updates.
*/
require_once plugin_dir_path(__FILE__) . 'includes/vendor/plugin-update-checker/plugin-update-checker.php';
$plugin_slug = Info::SLUG;
$update_url = Info::UPDATE_URL;
$myUpdateChecker = \Puc_v4_Factory::buildUpdateChecker(
$update_url . '?action=get_metadata&slug=' . $plugin_slug,
__FILE__,
$plugin_slug
);
/**
* Run the plugin.
*/
function run() {
require_once plugin_dir_path(__FILE__) . 'includes/class-plugin.php';
$plugin = new Plugin();
$plugin->run();
}
run();