migrator(); }); /** * Activation hook * * @since v3.0.0 */ register_activation_hook(__FILE__, function () { $migration = new \Essential_Addons_Elementor\Classes\Migration; $migration->plugin_activation_hook(); }); /** * Deactivation hook * * @since v3.0.0 */ register_deactivation_hook(__FILE__, function () { $migration = new \Essential_Addons_Elementor\Classes\Migration; $migration->plugin_deactivation_hook(); }); /** * Upgrade hook * * @since v3.0.0 */ add_action('upgrader_process_complete', function ($upgrader_object, $options) { $migration = new \Essential_Addons_Elementor\Classes\Migration; $migration->plugin_upgrade_hook($upgrader_object, $options); }, 10, 2); add_action( 'wp_loaded', function () { $setup_wizard = get_option( 'eael_setup_wizard' ); if ( $setup_wizard == 'redirect' ) { \Essential_Addons_Elementor\Classes\WPDeveloper_Setup_Wizard::redirect(); } if ( $setup_wizard == 'init' ) { new \Essential_Addons_Elementor\Classes\WPDeveloper_Setup_Wizard(); } } ); /** * WooCommerce HPOS Support * * @since v5.8.2 */ add_action( 'before_woocommerce_init', function() { if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); } } );