-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwc-poczta.php
54 lines (46 loc) · 2.01 KB
/
wc-poczta.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* @package WordPress
* @subpackage WC Poczta - Self Pickup with WooCommerce
*
* @copyright Copyright (c) 2020-2021, Leszek Pomianowski
* @link https://dev.lepo.co/
* @license GPL-3.0 https://www.gnu.org/licenses/gpl-3.0.txt
*
* @wc-poczta
* Plugin Name: Self Pickup with WooCommerce - InPost Paczkomaty, Polish Post, Żabka and Ruch
* Plugin URI: http://wordpress.org/plugins/wc-poczta/
* Description: Integration of self pickup in the Inpost Paczkomaty, Polish Post offices, Orlen, Żabka, Ruch stores and others.
* Author: lepo.co
* Author URI: https://lepo.co/
* License: GPL-3.0
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
* Version: 1.4.0
* Text Domain: wc_poczta
* Domain Path: /languages
*
* WC requires at least: 5.0.0
* WC tested up to: 5.8.1
*/
namespace WCPoczta;
defined('ABSPATH') or die('No script kiddies please!');
if (version_compare(PHP_VERSION, '7.4.1') >= 0) {
$pluginPath = plugin_dir_path(__FILE__);
if (defined('WP_DEBUG') && WP_DEBUG && is_file($pluginPath . 'vendor/autoload.php')) {
require_once $pluginPath . 'vendor/autoload.php';
}
require_once $pluginPath . 'code/schema/' . 'ShippingMethod.php';
require_once $pluginPath . 'code/core/' . 'Helpers.php';
require_once $pluginPath . 'code/core/' . 'Bootstrap.php';
require_once $pluginPath . 'code/core/' . 'Actions.php';
require_once $pluginPath . 'code/core/' . 'ShippingRegistrar.php';
\WCPoczta\Code\Core\Bootstrap::init($pluginPath, plugin_dir_url(__FILE__), '1.3.6');
} else {
add_action('admin_notices', function () {
$html = '<div class="notice notice-error"><p>';
$html .= '<strong>WC Poczta</strong><br>WC Poczta requires a minimum PHP version of 7.4.1. Your site uses ' . PHP_VERSION . '. You need to update your server if you want to use this plugin.<br/>';
$html .= '<a target="_blank" rel="noopener" href="https://wordpress.org/support/update-php/">Get a faster, more secure website: update your PHP today</a>';
$html .= '</p></div>';
echo $html;
}, 20);
}