-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·60 lines (55 loc) · 1.9 KB
/
Copy pathindex.php
File metadata and controls
executable file
·60 lines (55 loc) · 1.9 KB
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
55
56
57
58
59
60
<?php
/*
Plugin Name: Buckaroo Payments for WooCommerce
Plugin URI: http://www.buckaroo.nl
Author: Buckaroo
Author URI: http://www.buckaroo.nl
Description: WooCommerce payment gateway for iDEAL, Bancontact, Klarna, PayPal, credit cards and more, powered by Buckaroo.
Version: 4.9.1
WC requires at least: 5.0
WC tested up to: 11.0.0
Text Domain: wc-buckaroo-bpe-gateway
Domain Path: /languages
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
if (! defined('BK_PLUGIN_FILE')) {
define('BK_PLUGIN_FILE', __FILE__);
}
add_action(
'plugins_loaded',
function () {
require_once __DIR__ . '/vendor/autoload.php';
(new Buckaroo\Woocommerce\Core\Plugin())->init();
},
-1
);
/*
* Declare compatibility with the WooCommerce Cart & Checkout Blocks feature.
*
* Without this declaration WooCommerce lists the plugin under the "incompatible"
* extensions for the `cart_checkout_blocks` feature (see the WooCommerce Checkout
* block "incompatibleExtensions" data), which is what triggers the Site Editor
* notice suggesting merchants switch back to the Classic Checkout. The Buckaroo
* gateways fully support the block checkout, so this declaration is correct.
*
* Order meta goes through Buckaroo\Woocommerce\Order\OrderMeta and older data is
* copied across by MigrateOrderMetaToHpos, so `custom_order_tables` is declared too.
*/
add_action(
'before_woocommerce_init',
function () {
if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility(
'cart_checkout_blocks',
BK_PLUGIN_FILE,
true
);
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility(
'custom_order_tables',
BK_PLUGIN_FILE,
true
);
}
}
);