PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.7.0.5
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.7.0.5
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / includes / stripe / charitable-stripe-core-functions.php

charitable-stripe-core-functions.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.7.0.5, at includes/stripe/charitable-stripe-core-functions.php

62 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Stripe core functions.
4 *
5 * @package Charitable Stripe/Functions/Core
6 * @author David Bisset
7 * @copyright Copyright (c) 2021-2022, David Bisset
8 * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9 * @since 1.3.0
10 * @version 1.3.0
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 /**
19 * Return the instance of `Charitable_Stripe`.
20 *
21 * @since 1.3.0
22 *
23 * @return Charitable_Stripe
24 */
25 function charitable_stripe() {
26 return Charitable::get_instance();
27 }
28
29 /**
30 * This returns the Charitable_Stripe_Deprecated object.
31 *
32 * @since 1.4.0
33 *
34 * @return Charitable_Stripe_Deprecated
35 */
36 function charitable_stripe_deprecated() {
37 return Charitable_Stripe_Deprecated::get_instance();
38 }
39
40 /**
41 * Check whether webhooks should be set up.
42 *
43 * @since 1.3.0
44 *
45 * @return boolean
46 */
47 function charitable_stripe_should_setup_webhooks() {
48 /**
49 * Filter whether webhooks should be set up for this site.
50 *
51 * By default, this will return true unless this is localhost.
52 *
53 * @since 1.3.0
54 *
55 * @param boolean $should Whether the webhooks should be set up.
56 */
57 return apply_filters(
58 'charitable_stripe_setup_webhooks',
59 ! charitable_is_localhost()
60 );
61 }
62