This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
generated from a8cteam51/team51-plugin-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsift-decisions.php
58 lines (53 loc) · 1.7 KB
/
sift-decisions.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
<?php
/**
* The Team51 Plugin Scaffold bootstrap file.
*
* @since 1.0.0
* @version 1.0.0
* @author WordPress.com Special Projects
* @license GPL-3.0-or-later
*
* @noinspection ALL
*
* @wordpress-plugin
* Plugin Name: Sift Decisions
* Plugin URI: https://wpspecialprojects.wordpress.com
* Description: A plugin to integrate WooCommerce with Sift Science Fraud Detection
* Version: 0.0.1-alpha
* Requires at least: 6.2
* Tested up to: 6.2
* Requires PHP: 8.0
* Author: georgestephanis
* Author URI: https://wpspecialprojects.wordpress.com
* License: GPL v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: sift-decisions
* Domain Path: /languages
**/
defined( 'ABSPATH' ) || exit;
// Load plugin translations so they are available even for the error admin notices.
add_action(
'init',
static function () {
load_plugin_textdomain(
'sift-decisions',
false,
__DIR__ . '/languages'
);
}
);
// Load the autoloader.
if ( ! is_file( __DIR__ . '/vendor/autoload.php' ) ) {
add_action(
'admin_notices',
static function () {
$message = __( 'It seems like <strong>Sift Decisions</strong> is corrupted. Please reinstall!', 'sift-decisions' );
$html_message = wp_sprintf( '<div class="error notice wpcomsp-scaffold-error">%s</div>', wpautop( $message ) );
echo wp_kses_post( $html_message );
}
);
return;
}
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/src/sift-decisions.php';
\WPCOMSpecialProjects\SiftDecisions\SiftDecisions::get_instance();