-
Notifications
You must be signed in to change notification settings - Fork 0
/
wordpress-stripe-integration.php
46 lines (37 loc) · 1.25 KB
/
wordpress-stripe-integration.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: WordPress Stripe Integration
Plugin URI: http://pippinsplugins.com/
Description: A plugin to illustrate how to integrate Stripe and WordPress
Author: Pippin Williamson
Author URI: http://pippinsplugins.com
COntributors: mordauk
Version: 1.0
*/
/**********************************
* constants and globals
**********************************/
if(!defined('STRIPE_BASE_URL')) {
define('STRIPE_BASE_URL', plugin_dir_url(__FILE__));
}
if(!defined('STRIPE_BASE_DIR')) {
define('STRIPE_BASE_DIR', dirname(__FILE__));
}
$stripe_options = get_option('stripe_settings');
/*******************************************
* plugin text domain for translations
*******************************************/
load_plugin_textdomain( 'pippin_stripe', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
/**********************************
* includes
**********************************/
if(is_admin()) {
// load admin includes
include(STRIPE_BASE_DIR . '/includes/settings.php');
} else {
// load front-end includes
include(STRIPE_BASE_DIR . '/includes/scripts.php');
include(STRIPE_BASE_DIR . '/includes/shortcodes.php');
include(STRIPE_BASE_DIR . '/includes/process-payment.php');
include(STRIPE_BASE_DIR . '/includes/stripe-functions.php');
}