PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 1.6.8
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v1.6.8
2.7.0 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 All 43 releases
sellkit / includes / elementor / modules / checkout / integrations / stripe-woocommerce-official.php

stripe-woocommerce-official.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster 1.6.8, at includes/elementor/modules/checkout/integrations/stripe-woocommerce-official.php

69 lines 1.5 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 use Sellkit\Elementor\Modules\Checkout\Integrations\Integration;
8
9 /**
10 * Integration class to integrate stripe woocommerce official with sellkit checkout widget.
11 *
12 * @since 1.1.0
13 */
14 class Stripe_Woocommerce_Official extends Integration {
15 /**
16 * Original plugin class holder.
17 *
18 * @since 1.1.0
19 * @var object
20 */
21 private $parent;
22
23 /**
24 * Check requirement to enable gateway in sellkit checkout widget.
25 *
26 * @return bool
27 * @since 1.1.0
28 */
29 protected function requirements() {
30 // Plugin not installed.
31 if ( ! defined( 'WC_STRIPE_PLUGIN_PATH' ) ) {
32 return false;
33 }
34
35 if ( ! class_exists( 'WC_Stripe_Payment_Request' ) ) {
36 return false;
37 }
38
39 $this->parent = \WC_Stripe_Payment_Request::instance();
40
41 return true;
42 }
43
44 /**
45 * Content of express checkout methods.
46 *
47 * @return void
48 * @since 1.1.0
49 */
50 public function content() {
51 ?>
52 <div class="sellkit-stripe-woocommerce-official-integration" >
53 <?php $this->parent->display_payment_request_button_html(); ?>
54 </div>
55 <?php
56 }
57
58 /**
59 * Hooks to integrate current gateway with sellkit checkout widget.
60 *
61 * @return void
62 * @since 1.1.0
63 */
64 public function hooks() {
65 remove_action( 'woocommerce_checkout_before_customer_details', [ 'WC_Stripe_Payment_Request', 'display_payment_request_button_html' ], 1 );
66 remove_action( 'woocommerce_checkout_before_customer_details', [ 'WC_Stripe_Payment_Request', 'display_payment_request_button_separator_html' ], 2 );
67 }
68 }
69