PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 1.3.2
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v1.3.2
2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 1.8.1 All 42 releases
sellkit / includes / elementor / modules / checkout / integrations / integration.php

integration.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster 1.3.2, at includes/elementor/modules/checkout/integrations/integration.php

62 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Sellkit\Elementor\Modules\Checkout\Integrations;
4
5 defined( 'ABSPATH' ) || die();
6
7 /**
8 * Integration class to integrate gateways with sellkit checkout widget.
9 *
10 * @since 1.1.0
11 */
12 abstract class Integration {
13 /**
14 * Active available wooCommerce gateways.
15 *
16 * @since 1.1.0
17 * @var array
18 */
19 protected $gateways;
20
21 /**
22 * Run this class content if requirements are met.
23 *
24 * @since 1.1.0
25 * @return void
26 */
27 public function run() {
28 $this->gateways = WC()->payment_gateways->get_available_payment_gateways();
29
30 if ( false === $this->requirements() ) {
31 return;
32 }
33
34 $this->hooks();
35 add_action( 'sellkit-checkout-widget-express-methods', [ $this, 'content' ] );
36 }
37
38 /**
39 * Check requirement to enable gateway in sellkit checkout widget.
40 *
41 * @return bool
42 * @since 1.1.0
43 */
44 abstract protected function requirements();
45
46 /**
47 * Content of express checkout methods.
48 *
49 * @return void
50 * @since 1.1.0
51 */
52 abstract protected function content();
53
54 /**
55 * Hooks to integrate current gateway with sellkit checkout widget.
56 *
57 * @return void
58 * @since 1.1.0
59 */
60 abstract protected function hooks();
61 }
62