PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.12.2
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.12.2
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 / gateways / class-charitable-gateway-offline.php

class-charitable-gateway-offline.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.12.2, at includes/gateways/class-charitable-gateway-offline.php

90 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Offline Payment Gateway
4 *
5 * @version 1.0.0
6 * @package Charitable/Classes/Charitable_Gateway_Offline
7 * @author David Bisset
8 * @copyright Copyright (c) 2023, WP Charitable LLC
9 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 if ( ! class_exists( 'Charitable_Gateway_Offline' ) ) :
17
18 /**
19 * Offline Payment Gateway
20 *
21 * @since 1.0.0
22 */
23 class Charitable_Gateway_Offline extends Charitable_Gateway {
24
25 /**
26 * Gateway ID.
27 */
28 const ID = 'offline';
29
30 /**
31 * Whether the gateway supports Charitable 1.3.0.
32 *
33 * @var boolean
34 * @since 1.3.0
35 */
36 protected $supports_130 = false;
37
38 /**
39 * Instantiate the gateway class, defining its key values.
40 *
41 * @since 1.0.0
42 */
43 public function __construct() {
44 $this->name = apply_filters( 'charitable_gateway_offline_name', __( 'Offline', 'charitable' ) );
45
46 $this->defaults = array(
47 'label' => __( 'Offline Donation', 'charitable' ),
48 'instructions' => __( 'Thank you for your donation. We will contact you shortly for payment.', 'charitable' ),
49 );
50
51 $this->supports = array(
52 'recurring',
53 '1.3.0',
54 );
55 }
56
57 /**
58 * Register gateway settings.
59 *
60 * @since 1.0.0
61 *
62 * @param array $settings
63 * @return array
64 */
65 public function gateway_settings( $settings ) {
66 $settings['instructions'] = array(
67 'type' => 'textarea',
68 'title' => __( 'Instructions', 'charitable' ),
69 'help' => __( 'These are the instructions you provide to donors after they make a donation.', 'charitable' ),
70 'priority' => 6,
71 'default' => $this->defaults['instructions'],
72 );
73
74 return $settings;
75 }
76
77 /**
78 * Returns the current gateway's ID.
79 *
80 * @since 1.0.3
81 *
82 * @return string
83 */
84 public static function get_gateway_id() {
85 return self::ID;
86 }
87 }
88
89 endif;
90