PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 1.2.2
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v1.2.2
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-for-woocommerce.php

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

61 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 Payment Plugins for Stripe WooCommerce gateway with sellkit checkout widget.
11 *
12 * @since 1.1.0
13 */
14 class Stripe_For_Woocommerce extends Integration {
15 /**
16 * Check requirement to enable gateway in sellkit checkout widget.
17 *
18 * @return bool
19 * @since 1.1.0
20 */
21 protected function requirements() {
22 return class_exists( '\WC_Stripe_Field_Manager' );
23 }
24
25 /**
26 * Content of express checkout methods.
27 *
28 * @return void
29 * @since 1.1.0
30 */
31 public function content() {
32 $gateways = [];
33
34 foreach ( WC()->payment_gateways()->get_available_payment_gateways() as $gateway ) {
35 if ( $gateway->supports( 'wc_stripe_banner_checkout' ) && $gateway->banner_checkout_enabled() ) {
36 $gateways[ $gateway->id ] = $gateway;
37 }
38 }
39
40 if ( count( $gateways ) > 0 ) {
41 echo '<div class="sellkit-stripe-integration"><ul class="wc_stripe_checkout_banner_gateways">';
42 foreach ( $gateways as $gateway ) :
43 ?>
44 <li class="wc-stripe-checkout-banner-gateway banner_payment_method_<?php echo esc_attr( $gateway->id ); ?>"></li>
45 <?php
46 endforeach;
47 echo '</ul></div>';
48 }
49 }
50
51 /**
52 * Hooks to integrate current gateway with sellkit checkout widget.
53 *
54 * @return void
55 * @since 1.1.0
56 */
57 public function hooks() {
58 remove_action( 'woocommerce_checkout_before_customer_details', [ 'WC_Stripe_Field_Manager', 'output_banner_checkout_fields' ] );
59 }
60 }
61