# sellkit/1.2.2/includes/elementor/modules/checkout/integrations/woo-payment-gateway.php

SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster, version 1.2.2. 60 lines.

- Page: https://pluginprobe.com/plugins/sellkit/1.2.2/code/includes/elementor/modules/checkout/integrations/woo-payment-gateway.php
- Raw: https://pluginprobe.com/plugins/sellkit/1.2.2/raw/includes/elementor/modules/checkout/integrations/woo-payment-gateway.php
- Modified: 2022-05-26T11:44:04+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sellkit/1.2.2/code/includes/elementor/modules/checkout/integrations/woo-payment-gateway.php#L10-L20`.

```php
<?php

namespace Sellkit\Elementor\Modules\Checkout\Integrations;

defined( 'ABSPATH' ) || die();

use Sellkit\Elementor\Modules\Checkout\Integrations\Integration;

/**
 * Integration class to integrate Plugins Braintree For WooCommerce gateways with sellkit checkout widget.
 *
 * @since 1.1.0
 */
class Woo_Payment_Gateway extends Integration {
	/**
	 * Check requirement to enable gateway in sellkit checkout widget.
	 *
	 * @return bool
	 * @since 1.1.0
	 */
	protected function requirements() {
		return defined( 'WC_BRAINTREE_PLUGIN_NAME' );
	}

	/**
	 * Content of express checkout methods.
	 *
	 * @return void
	 * @since 1.1.0
	 */
	public function content() {
		$gateways = [];

		foreach ( WC()->payment_gateways()->get_available_payment_gateways() as $id => $gateway ) {
			if ( $gateway->supports( 'wc_braintree_banner_checkout' ) && $gateway->banner_checkout_enabled() ) {
				$gateways[ $id ] = $gateway;
			}
		}

		if ( count( $gateways ) > 0 ) {
			foreach ( $gateways as $gateway ) :?>
				<div class="wc-braintree-banner-gateway wc_braintree_banner_gateway_<?php echo esc_attr( $gateway->id ); ?>">
					<?php $gateway->banner_fields(); ?>
				</div>
				<?php
			endforeach;
		}
	}

	/**
	 * Hooks to integrate current gateway with sellkit checkout widget.
	 *
	 * @return void
	 * @since 1.1.0
	 */
	public function hooks() {
		remove_action( 'woocommerce_checkout_before_customer_details', 'wc_braintree_banner_checkout_template', );
	}
}

```
