This repository has been archived by the owner on May 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
dintero-hp.php
79 lines (65 loc) · 2.18 KB
/
dintero-hp.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
Plugin Name: Dintero Checkout (Legacy)
Description: Dintero Checkout - Express Checkout
Version: 2022.11.22
Author: Dintero
Author URI: mailto:integration@dintero.com
Text Domain: dintero-hp
Domain Path: /languages
*
* @package /dintero-hp
*/
defined( 'ABSPATH' ) || exit;
define( 'DINTERO_HP_VERSION', '2022.11.22' );
if ( ! defined( 'DHP_PLUGIN_FILE' ) ) {
define( 'DHP_PLUGIN_FILE', __FILE__ );
}
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-dintero-hp-activator.php
*/
function activate_dintero_hp() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-dintero-hp-activator.php';
Dintero_HP_Activator::activate();
}
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/class-dintero-hp-deactivator.php
*/
function deactivate_dintero_hp() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-dintero-hp-deactivator.php';
Dintero_HP_Deactivator::deactivate();
}
register_activation_hook( __FILE__, 'activate_dintero_hp' );
register_deactivation_hook( __FILE__, 'deactivate_dintero_hp' );
/**
* The core plugin class that is used to define internationalization,
* admin-specific hooks, and public-facing site hooks.
*/
require plugin_dir_path( __FILE__ ) . 'includes/class-dintero-hp-request.php';
require plugin_dir_path( __FILE__ ) . 'includes/class-dintero-hp-request-builder.php';
require plugin_dir_path( __FILE__ ) . 'includes/class-dintero-hp-adapter.php';
require plugin_dir_path( __FILE__ ) . 'includes/class-dintero-hp.php';
require plugin_dir_path( __FILE__ ) . 'includes/class-wc-dintero-hp.php';
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*/
function run_dintero_hp() {
$plugin_basename = plugin_basename( __FILE__ );
$plugin = new Dintero_HP($plugin_basename);
$plugin->run();
}
run_dintero_hp();
/**
* Get instance of WooCommerce Dintero Plugin
*/
function WCDHP() {
return WC_Dintero_HP::instance();
}
// Global for backwards compatibility.
$GLOBALS['woocommerce-dintero'] = WCDHP();