-
Notifications
You must be signed in to change notification settings - Fork 1
/
wp-nowpayments-integration.php
60 lines (53 loc) · 2.11 KB
/
wp-nowpayments-integration.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
55
56
57
58
59
60
<?php
/**
* WordPress nowpayments.io integration
*
* @copyright Copyright (C) 2022, Dennis Ploetner, re@lloc.de
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 or later
* @wordpress-plugin
*
* Plugin Name: WordPress nowpayments.io integration
* Version: 1.0.0
* Requires at least: 6.6
* Plugin URI: https://github.com/lloc/wp-nowpayments-itegration
* Description: Cryptocurrency Payment integration using the NOWPayments API
* Author: Dennis Ploetner
* Author URI: https://ploetner.io/
* Text Domain: wp-nowpayments-integration
* Domain Path: /languages/
* License: GPLv2 or later
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
declare( strict_types=1 );
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require __DIR__ . '/vendor/autoload.php';
defined( 'NOWPAYMENTS_PLUGIN_VERSION' ) || define( 'NOWPAYMENTS_PLUGIN_VERSION', '1.0.0' );
add_action(
'plugins_loaded',
function () {
$builder = new DI\ContainerBuilder();
$builder->addDefinitions( require __DIR__ . '/config.php' );
$container = $builder->build();
lloc\Nowpayments\Plugin::init( __FILE__ );
lloc\Nowpayments\OptionsPage::init();
lloc\Nowpayments\Settings::init();
lloc\Nowpayments\AdminWidget::init( $container->get( lloc\Nowpayments\Services\ApiStatusService::class ) );
lloc\Nowpayments\Logs\ApplicationLogs::init( $container->get( Psr\Log\LoggerInterface::class ) );
}
);
add_filter( 'use_block_editor_for_post', '__return_true', 99 );
add_filter( 'use_block_editor_for_post_type', '__return_true', 99 );