-
Notifications
You must be signed in to change notification settings - Fork 29
/
leaky-paywall.php
125 lines (108 loc) · 5.03 KB
/
leaky-paywall.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
/**
* Main PHP file used to for initial calls to Leaky Paywall classes and functions.
*
* @package Leaky Paywall
* @since 1.0.0
*/
/*
Plugin Name: Leaky Paywall
Plugin URI: https://leakypaywall.com/
Description: The first and most flexible metered paywall for WordPress. Sell subscriptions without sacrificing search and social visibility.
Author: Leaky Paywall
Version: 4.21.6
Author URI: https://leakypaywall.com/
Tags: paywall, subscriptions, metered, membership, pay wall, content monetization, metered access, metered pay wall, paid content
Text Domain: leaky-paywall
Domain Path: /i18n
Requires at least: 5.6
Requires PHP: 7.4
*/
// Define global variables...
if ( ! defined( 'ZEEN101_STORE_URL' ) ) {
define( 'ZEEN101_STORE_URL', 'https://zeen101.com' );
}
define( 'LEAKY_PAYWALL_NAME', 'Leaky Paywall for WordPress' );
define( 'LEAKY_PAYWALL_SLUG', 'leaky-paywall' );
define( 'LEAKY_PAYWALL_VERSION', '4.21.6' );
define( 'LEAKY_PAYWALL_DB_VERSION', '1.0.5' );
define( 'LEAKY_PAYWALL_URL', plugin_dir_url( __FILE__ ) );
define( 'LEAKY_PAYWALL_PATH', plugin_dir_path( __FILE__ ) );
define( 'LEAKY_PAYWALL_BASENAME', plugin_basename( __FILE__ ) );
define( 'LEAKY_PAYWALL_REL_DIR', dirname( LEAKY_PAYWALL_BASENAME ) );
define( 'LEAKY_PAYWALL_STRIPE_API_VERSION', '2020-03-02' );
define( 'LEAKY_PAYWALL_STRIPE_PARTNER_ID', 'pp_partner_IDILs8UMcYIw41' );
if ( ! defined( 'PAYPAL_LIVE_URL' ) ) {
define( 'PAYPAL_LIVE_URL', 'https://www.paypal.com/' );
}
if ( ! defined( 'PAYPAL_SANDBOX_URL' ) ) {
define( 'PAYPAL_SANDBOX_URL', 'https://www.sandbox.paypal.com/' );
}
if ( ! defined( 'PAYPAL_PAYMENT_SANDBOX_URL' ) ) {
define( 'PAYPAL_PAYMENT_SANDBOX_URL', 'https://www.sandbox.paypal.com/cgi-bin/webscr' );
}
if ( ! defined( 'PAYPAL_PAYMENT_LIVE_URL' ) ) {
define( 'PAYPAL_PAYMENT_LIVE_URL', 'https://www.paypal.com/cgi-bin/webscr' );
}
if ( ! defined( 'PAYPAL_NVP_API_SANDBOX_URL' ) ) {
define( 'PAYPAL_NVP_API_SANDBOX_URL', 'https://api-3t.sandbox.paypal.com/nvp' );
}
if ( ! defined( 'PAYPAL_NVP_API_LIVE_URL' ) ) {
define( 'PAYPAL_NVP_API_LIVE_URL', 'https://api-3t.paypal.com/nvp' );
}
/**
* Instantiate Pigeon Pack class, require helper files
*
* @since 1.0.0
*/
function leaky_paywall_plugins_loaded() {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
if ( is_plugin_active( 'issuem/issuem.php' ) ) {
define( 'ACTIVE_ISSUEM', true );
} else {
define( 'ACTIVE_ISSUEM', false );
}
require_once 'class.php';
// Instantiate the Pigeon Pack class.
if ( class_exists( 'Leaky_Paywall' ) ) {
global $leaky_paywall;
$leaky_paywall = new Leaky_Paywall();
require_once LEAKY_PAYWALL_PATH . 'functions.php';
require_once LEAKY_PAYWALL_PATH . 'shortcodes.php';
require_once LEAKY_PAYWALL_PATH . 'subscriber-table.php';
require_once LEAKY_PAYWALL_PATH . 'metaboxes.php';
require_once LEAKY_PAYWALL_PATH . 'include/template-functions.php';
require_once LEAKY_PAYWALL_PATH . 'include/admin/dashboard-widgets.php';
require_once LEAKY_PAYWALL_PATH . 'include/admin/lp-transaction.php';
require_once LEAKY_PAYWALL_PATH . 'include/admin/lp-incomplete-user.php';
require_once LEAKY_PAYWALL_PATH . 'include/admin/tools.php';
require_once LEAKY_PAYWALL_PATH . 'include/admin/insights/functions.php';
require_once LEAKY_PAYWALL_PATH . 'include/admin/settings/settings.php';
require_once LEAKY_PAYWALL_PATH . 'include/admin/insights/insights.php';
require_once LEAKY_PAYWALL_PATH . 'include/admin/onboarding.php';
include LEAKY_PAYWALL_PATH . 'include/license-key.php';
include LEAKY_PAYWALL_PATH . 'include/error-tracking.php';
include LEAKY_PAYWALL_PATH . 'include/registration-functions.php';
include LEAKY_PAYWALL_PATH . 'include/rest-functions.php';
include LEAKY_PAYWALL_PATH . 'include/class-restrictions.php';
include LEAKY_PAYWALL_PATH . 'include/class-lp-transaction.php';
include LEAKY_PAYWALL_PATH . 'include/class-lp-logging.php';
// gateways.
include LEAKY_PAYWALL_PATH . 'include/gateways/gateway-functions.php';
include LEAKY_PAYWALL_PATH . 'include/gateways/stripe/functions.php';
include LEAKY_PAYWALL_PATH . 'include/gateways/paypal/functions.php';
include LEAKY_PAYWALL_PATH . 'include/gateways/class-leaky-paywall-payment-gateway.php';
include LEAKY_PAYWALL_PATH . 'include/gateways/class-leaky-paywall-payment-gateway-stripe.php';
include LEAKY_PAYWALL_PATH . 'include/gateways/class-leaky-paywall-payment-gateway-stripe-checkout.php';
include LEAKY_PAYWALL_PATH . 'include/gateways/class-leaky-paywall-payment-gateway-paypal.php';
include LEAKY_PAYWALL_PATH . 'include/gateways/class-leaky-paywall-payment-gateway-manual.php';
include LEAKY_PAYWALL_PATH . 'include/gateways/class-leaky-paywall-payment-gateways.php';
if ( ! class_exists( 'Stripe\Stripe' ) ) {
require_once LEAKY_PAYWALL_PATH . 'include/stripe/init.php';
}
// Internationalization.
load_plugin_textdomain( 'leaky-paywall', false, LEAKY_PAYWALL_REL_DIR . '/i18n/' );
do_action( 'leaky_paywall_plugins_loaded' );
}
}
add_action( 'plugins_loaded', 'leaky_paywall_plugins_loaded', 4815162342 ); // wait for the plugins to be loaded before init.