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

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

59 lines 1.2 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 woocommerce amazon pay with sellkit checkout widget.
11 *
12 * @since 1.1.0
13 */
14 class Amazon_Pay_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 // Plugin not installed.
23 if ( ! class_exists( 'WC_Amazon_Payments_Advanced' ) ) {
24 return false;
25 }
26
27 $this->instance = wc_apa()->get_gateway();
28
29 // Gateway is not active.
30 if ( ! $this->instance->is_available() ) {
31 return false;
32 }
33
34 return true;
35 }
36
37 /**
38 * Content of express checkout methods.
39 *
40 * @return void
41 * @since 1.1.0
42 */
43 public function content() {
44 echo '<div class="sellkit-amazon-pay-woocommerce">';
45 echo $this->instance->checkout_button( false );
46 echo '</div>';
47 }
48
49 /**
50 * Hooks to integrate current gateway with sellkit checkout widget.
51 *
52 * @return void
53 * @since 1.1.0
54 */
55 public function hooks() {
56 remove_action( 'woocommerce_before_checkout_form', [ $this->instance, 'checkout_message' ], 5 );
57 }
58 }
59