PluginProbe ʕ •ᴥ•ʔ
Easy Actions Scheduler Cleaner / 1.3.0
Easy Actions Scheduler Cleaner v1.3.0
trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0
easy-actions-scheduler-cleaner-ayudawp / easy-actions-scheduler-cleaner-ayudawp.php
easy-actions-scheduler-cleaner-ayudawp Last commit date
assets 3 weeks ago includes 3 weeks ago changelog.txt 3 weeks ago easy-actions-scheduler-cleaner-ayudawp.php 3 weeks ago readme.txt 2 weeks ago uninstall.php 3 weeks ago
easy-actions-scheduler-cleaner-ayudawp.php
114 lines
1 <?php
2 /**
3 * Plugin Name: Easy Actions Scheduler Cleaner
4 * Plugin URI: https://servicios.ayudawp.com
5 * Description: Clean up your Action Scheduler database by removing completed, failed, canceled, past-due actions, old pending actions, and action logs. Manual and scheduled cleanup modes with email notifications.
6 * Version: 1.3.0
7 * Author: Fernando Tellado
8 * Author URI: https://ayudawp.com
9 * Requires at least: 5.0
10 * Tested up to: 7.0
11 * Requires PHP: 7.4
12 * WC requires at least: 3.0
13 * WC tested up to: 10.7
14 *
15 * WC HPOS Compatible: yes
16 * WC Blocks Compatible: yes
17 * License: GPL v2 or later
18 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
19 * Text Domain: easy-actions-scheduler-cleaner-ayudawp
20 *
21 * @package EasyActionsSchedulerCleanerAyudaWP
22 */
23
24 // Prevent direct access.
25 if ( ! defined( 'ABSPATH' ) ) {
26 exit;
27 }
28
29 // Define constants.
30 define( 'EASC_PLUGIN_VERSION', '1.3.0' );
31 define( 'EASC_PLUGIN_FILE', __FILE__ );
32 define( 'EASC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
33 define( 'EASC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
34 define( 'EASC_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
35
36 /* Declare HPOS compatibility */
37 add_action(
38 'before_woocommerce_init',
39 function () {
40 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
41 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
42 }
43 }
44 );
45
46 // Include required files.
47 require_once EASC_PLUGIN_DIR . 'includes/core-functions.php';
48 require_once EASC_PLUGIN_DIR . 'includes/database-functions.php';
49 require_once EASC_PLUGIN_DIR . 'includes/space-functions.php';
50 require_once EASC_PLUGIN_DIR . 'includes/schedule-functions.php';
51 require_once EASC_PLUGIN_DIR . 'includes/notification-functions.php';
52 require_once EASC_PLUGIN_DIR . 'includes/admin-functions.php';
53 require_once EASC_PLUGIN_DIR . 'includes/class-easc-promo-banner.php';
54
55 /**
56 * Main plugin class
57 *
58 * @since 1.0.0
59 */
60 class Easy_Actions_Scheduler_Cleaner_AyudaWP {
61
62 /**
63 * Single instance of the plugin
64 *
65 * @since 1.0.0
66 * @var Easy_Actions_Scheduler_Cleaner_AyudaWP
67 */
68 private static $instance = null;
69
70 /**
71 * Get single instance
72 *
73 * @since 1.0.0
74 * @return Easy_Actions_Scheduler_Cleaner_AyudaWP
75 */
76 public static function get_instance() {
77 if ( null === self::$instance ) {
78 self::$instance = new self();
79 }
80 return self::$instance;
81 }
82
83 /**
84 * Constructor
85 *
86 * @since 1.0.0
87 */
88 public function __construct() {
89 add_action( 'plugins_loaded', array( $this, 'init' ) );
90 register_activation_hook( EASC_PLUGIN_FILE, 'easc_on_activation' );
91 register_deactivation_hook( EASC_PLUGIN_FILE, 'easc_on_deactivation' );
92 }
93
94 /**
95 * Initialize plugin
96 *
97 * @since 1.0.0
98 */
99 public function init() {
100 if ( is_admin() ) {
101 easc_init_admin();
102 }
103
104 // Register scheduled cleanup hook.
105 easc_init_schedule();
106
107 // Register notification hooks.
108 easc_init_notifications();
109 }
110 }
111
112 // Initialize plugin.
113 Easy_Actions_Scheduler_Cleaner_AyudaWP::get_instance();
114