PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 2.7.0
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v2.7.0
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 / woo-payment-gateway.php

woo-payment-gateway.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster 2.7.0, at includes/elementor/modules/checkout/integrations/woo-payment-gateway.php

60 lines 1.4 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 Plugins Braintree For WooCommerce gateways with sellkit checkout widget.
11 *
12 * @since 1.1.0
13 */
14 class Woo_Payment_Gateway 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 defined( 'WC_BRAINTREE_PLUGIN_NAME' );
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 $id => $gateway ) {
35 if ( $gateway->supports( 'wc_braintree_banner_checkout' ) && $gateway->banner_checkout_enabled() ) {
36 $gateways[ $id ] = $gateway;
37 }
38 }
39
40 if ( count( $gateways ) > 0 ) {
41 foreach ( $gateways as $gateway ) :?>
42 <div class="wc-braintree-banner-gateway wc_braintree_banner_gateway_<?php echo esc_attr( $gateway->id ); ?>">
43 <?php $gateway->banner_fields(); ?>
44 </div>
45 <?php
46 endforeach;
47 }
48 }
49
50 /**
51 * Hooks to integrate current gateway with sellkit checkout widget.
52 *
53 * @return void
54 * @since 1.1.0
55 */
56 public function hooks() {
57 remove_action( 'woocommerce_checkout_before_customer_details', 'wc_braintree_banner_checkout_template' );
58 }
59 }
60