-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwoo-cancel-abandoned-order.php
46 lines (32 loc) · 1.17 KB
/
woo-cancel-abandoned-order.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
<?php
/*
Plugin Name: WooCommerce Cancel Abandoned Order
Plugin URI: https://github.com/rvola/woo-cancel-abandoned-order
Description: Cancel "on hold" orders after a certain number of days or by hours
Version: 2.0.0
Revision: 2022-05-06
Creation: 2017-10-28
Author: RVOLA
Author URI: https://rvola.com
Text Domain: woo-cancel-abandoned-order
Domain Path: /languages
Requires at least: 4.0
Tested up to: 6.1
Requires PHP: 7.0
WC requires at least: 2.2
WC tested up to: 7.0
License: GNU General Public License v3.0
License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/
namespace RVOLA\WOO\CAO;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'WOOCAO_FILE', __FILE__ );
define( 'WOOCAO_VERSION', '2.0.0' );
include_once ABSPATH . 'wp-admin/includes/plugin.php';
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
require_once dirname( WOOCAO_FILE ) . '/includes/class-wp.php';
add_action( 'wp_loaded', array( __NAMESPACE__ . '\\WP', 'instance' ), 10 );
register_deactivation_hook( WOOCAO_FILE, array( __NAMESPACE__ . '\\CAO', 'clean_cron' ) );
}