PluginProbe
WeeConnectPay – Clover Payment Gateway for WooCommerce / trunk
WeeConnectPay – Clover Payment Gateway for WooCommerce vtrunk
4.14.2 4.14.0 4.13.2 4.13.1 4.13.0 4.3.9 4.3.6 4.3.5 4.3.4 4.3.2 trunk 3.10.2 3.10.7 3.11.0 3.11.3 3.11.4 3.11.5 3.12.3 3.13.10 3.13.12 3.13.5 3.13.6 3.14.2 3.14.4 3.15.1 All 49 releases
weeconnectpay / weeconnectpay.php

weeconnectpay.php in WeeConnectPay – Clover Payment Gateway for WooCommerce trunk, at weeconnectpay.php

116 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php /** @noinspection PhpCSValidationInspection */
2
3 /**
4 * The plugin bootstrap file
5 *
6 * This file is read by WordPress to generate the plugin information in the plugin
7 * admin area. This file also includes all the dependencies used by the plugin,
8 * registers the activation and deactivation functions, and defines a function
9 * that starts the plugin.
10 *
11 * @link https://www.weeconnectpay.com/
12 * @since 1.0.0
13 * @package WeeConnectPay
14 *
15 * @wordpress-plugin
16 * Plugin Name: WeeConnectPay
17 * Plugin URI: https://weeconnectpay.com/plugin?platform=wordpress
18 * Description: Integrate Clover Payments with your WooCommerce online store.
19 * Tags: clover, payments, weeconnect, e-commerce, gateway
20 * Version: 4.14.2
21 * Requires at least: 5.6
22 * Tested Up To: 7.1
23 * Requires PHP: 7.4
24 * Author: WeeConnectPay
25 * Author URI: https://weeconnectpay.com/
26 * Contributors: @weeconnectpay
27 * License: GPL-3.0+
28 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
29 * Text Domain: weeconnectpay
30 * Domain Path: /languages
31 * Requires Plugins: woocommerce
32 * WC requires at least: 3.0.4
33 * WC tested up to: 11.0.1
34 */
35
36 // If this file is called directly, abort.
37 if (!defined('WPINC')) {
38 die;
39 }
40 const WEECONNECT_VERSION = '4.14.2';
41
42 define( 'WEECONNECTPAY_PLUGIN_URL', plugin_dir_url(__FILE__));
43 define( 'WEECONNECTPAY_PLUGIN_PATH', plugin_dir_path(__FILE__));
44
45 /**
46 * The code that runs during plugin activation.
47 * This action is documented in includes/WeeConnectPayActivator.php
48 */
49 function activate_weeconnectpay()
50 {
51 require_once plugin_dir_path(__FILE__) . 'includes/WeeConnectPayActivator.php';
52 WeeConnectPay\WordPress\Plugin\includes\WeeConnectPayActivator::activate();
53 }
54
55 /**
56 * The code that runs during plugin deactivation.
57 * This action is documented in includes/WeeConnectPayDeactivator.php
58 */
59 function deactivate_weeconnectpay()
60 {
61 require_once plugin_dir_path(__FILE__) . 'includes/WeeConnectPayDeactivator.php';
62 WeeConnectPay\WordPress\Plugin\includes\WeeConnectPayDeactivator::deactivate();
63 }
64
65 register_activation_hook(__FILE__, 'activate_weeconnectpay');
66 register_deactivation_hook(__FILE__, 'deactivate_weeconnectpay');
67
68 /**
69 * The core plugin class that is used to define internationalization,
70 * admin-specific hooks, and site-facing site hooks.
71 */
72 require plugin_dir_path(__FILE__) . 'includes/WeeConnectPay.php';
73
74 /**
75 * Begins execution of the plugin.
76 *
77 * Since everything within the plugin is registered via hooks,
78 * then kicking off the plugin from this point in the file does
79 * not affect the page life cycle.
80 *
81 * @since 1.0.0
82 */
83 function run_weeconnectpay()
84 {
85 $plugin = WeeConnectPay\WordPress\Plugin\includes\WeeConnectPay::get_instance();
86 $plugin->run();
87 }
88
89 run_weeconnectpay();
90
91 /**
92 * WooCommerce requires this snippet being added in the main plugin file to declare certain compatibilities
93
94 *
95 * We could declare the plugin file and add it where we add all of our hooks, but for the time being we are leaving it here
96 */
97 add_action( 'before_woocommerce_init', function() {
98 /**
99 * Blocks-based checkout compatibility.
100 * Compatibility working with WooCommerce instances that use WooCommerce Checkout Blocks in their checkout page
101 * See: https://developer.woocommerce.com/2023/11/06/faq-extending-cart-and-checkout-blocks/
102 */
103 if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
104 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true );
105 }
106
107 /**
108 * High Performance Order Storage (HPOS) compatibility.
109 * Compatibility working with WooCommerce instances that have orders that are potentially not stored in the wp_posts table
110 * See: https://developer.woocommerce.com/docs/hpos-extension-recipe-book/
111 */
112 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
113 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
114 }
115 } );
116