PluginProbe
MakeCommerce for WooCommerce / 4.1.0
MakeCommerce for WooCommerce v4.1.0
4.1.0 4.0.8 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.0 2.2.1 2.2.2 All 96 releases
makecommerce / makecommerce.php

makecommerce.php in MakeCommerce for WooCommerce 4.1.0, at makecommerce.php

47 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 * @link https://makecommerce.net/
4 * @since 4.0.0
5 * @package Makecommerce
6 *
7 * @wordpress-plugin
8 * Plugin Name: MakeCommerce
9 * Plugin URI: https://makecommerce.net/
10 * Description: Adds MakeCommerce payment gateway and shipping methods to WooCommerce checkout
11 * Version: 4.1.0
12 * Author: Maksekeskus AS
13 * Author URI: https://makecommerce.net/
14 * License: GPL-2.0+
15 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
16 * Text Domain: makecommerce
17 * Domain Path: /languages
18 * Requires Plugins: woocommerce
19 * Requires at least: 6.8.1
20 * Requires PHP: 8.1
21 * WC requires at least: 9.9.3
22 * WC tested up to: 11.0.1
23 * WC HPOS compatibility: yes
24 * WC Legacy Order Table Compatibility: yes
25 */
26
27 function mc_table_exists(string $table): bool {
28 global $wpdb;
29 $table_name = $wpdb->prefix . $table;
30 return $wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $table_name)) === $table_name;
31 }
32
33
34 if (
35 (
36 get_option('mc_version') !== false ||
37 get_option('wc_mc_version') !== false ||
38 mc_table_exists('mc_banklinks')
39 ) &&
40 !filter_var(get_option('mc_shipping_plus'), FILTER_VALIDATE_BOOLEAN)
41 ) {
42 require_once plugin_dir_path(__FILE__) . 'config.php';
43 } else {
44 require_once plugin_dir_path(__FILE__) . 'makecommerce/makecommerce.php';
45 }
46
47