-
Notifications
You must be signed in to change notification settings - Fork 1
/
payment-continue.php
57 lines (47 loc) · 1.57 KB
/
payment-continue.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
<?php
/**
* Plugin Name: Gravity Forms Payment Continue
* Plugin URI: https://sternerstuffdesign.com/2017/04/adding-gravity-forms-paypal-continue-url/
* Description: Exposes the PayPal URL needed to complete payments.
* Author: Sterner Stuff Design
* Author URI: https://sternerstuffdesign.com
* Text Domain: gravity-forms-payment-continue
* Domain Path: /languages
* Version: 1.1.1
*
* @package Gravity_Forms_Payment_Continue
*/
define( 'GF_PAYMENT_CONTINUE_ADDON_VERSION', '1.1.0' );
define( 'GF_PAYMENT_CONTINUE_ADDON_SLUG', 'payment-continue');
// If Gravity Forms is loaded, bootstrap Gravity Forms PayPal Standard Continue.
add_action( 'gform_loaded', array( 'GF_Payment_Continue_AddOn_Bootstrap', 'load' ), 5 );
/**
* Class GF_Payment_Continue_AddOn_Bootstrap
*
* Handles the loading of Gravity Forms Payment Continue and registers with the Add-On framework.
*/
class GF_Payment_Continue_AddOn_Bootstrap {
/**
* If the Add-On Framework exists, Gravity Forms Payment Continue is loaded.
*
* @access public
* @static
*/
public static function load() {
if ( ! method_exists( 'GFForms', 'include_addon_framework' ) ) {
return;
}
require_once( 'gravity-forms-payment-continue.php' );
GFAddOn::register( 'GravityFormsPaymentContinue' );
}
}
/**
* Returns an instance of the GravityFormsPaymentContinue class
*
* @see GravityFormsPaymentContinue::get_instance()
*
* @return object GravityFormsPaymentContinue
*/
function gf_payment_continue() {
return GravityFormsPaymentContinue::get_instance();
}