-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
44 lines (37 loc) · 1.33 KB
/
main.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
<?php
/*
Plugin Name: HashPress Reviews
Description: Integrate Hedera Smart Contracts into your WordPress website to get verifiable reviews.
Version: 0.1
Author: HashPress
Author URI: https://hashpress.io/
*/
// Exit if accessed directly.
if (!defined('ABSPATH')) {
exit;
}
require_once plugin_dir_path(__FILE__) . 'lib/enqueue.php';
require_once plugin_dir_path(__FILE__) . 'lib/helpers.php';
require_once plugin_dir_path(__FILE__) . 'lib/product.php';
require_once plugin_dir_path(__FILE__) . 'lib/acf.php';
require_once plugin_dir_path(__FILE__) . 'lib/rest.php';
require_once plugin_dir_path(__FILE__) . 'lib/shortcodes/latest-reviews.php';
// load these only if woocommerce is active
if (!class_exists('WooCommerce')) return;
require_once plugin_dir_path(__FILE__) . 'lib/product.php';
function enable_hashpress_core_from_reviews()
{
$core = 'hashpress-core/main.php';
if (in_array($core, apply_filters('active_plugins', get_option('active_plugins'))) == false) {
activate_plugin($core);
}
}
add_action('init', 'enable_hashpress_core_from_reviews');
function enable_hashpress_pay_from_reviews()
{
$pay = 'hashpress-pay/main.php';
if (in_array($pay, apply_filters('active_plugins', get_option('active_plugins'))) == false) {
activate_plugin($pay);
}
}
add_action('init', 'enable_hashpress_pay_from_reviews');