'; echo '' . esc_html__( 'PizzaPilot', 'pizzapilot' ) . ': '; echo esc_html__( 'WooCommerce is required for PizzaPilot to work. Please install and activate WooCommerce.', 'pizzapilot' ); echo '

'; delete_transient( 'pizzapilot_missing_woocommerce' ); // Deactivate the plugin. deactivate_plugins( plugin_basename( __FILE__ ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( isset( $_GET['activate'] ) ) { unset( $_GET['activate'] ); } return; } // Welcome notice on first activation. if ( get_transient( 'pizzapilot_activation_notice' ) ) { echo '

'; echo '' . esc_html__( 'PizzaPilot activated!', 'pizzapilot' ) . ' '; echo ''; echo esc_html__( 'Configure your settings', 'pizzapilot' ); echo ' '; echo esc_html__( 'to get started.', 'pizzapilot' ); echo '

'; delete_transient( 'pizzapilot_activation_notice' ); } } add_action( 'admin_notices', 'pizzapilot_admin_notices' ); /** * Declare compatibility with WooCommerce High-Performance Order Storage (HPOS). * * @since 1.1.0 */ 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 ); } } ); require PIZZAPILOT_PLUGIN_DIR . 'includes/class-pizzapilot-helpers.php'; /** * The core plugin class that is used to define internationalization, * admin-specific hooks, and public-facing site hooks. */ require PIZZAPILOT_PLUGIN_DIR . 'includes/class-pizzapilot.php'; /** * Begins execution of the plugin. * * Since everything within the plugin is registered via hooks, * then kicking off the plugin from this point in the file does * not affect the page life cycle. * * @since 1.0.0 */ function pizzapilot_run() { $plugin = new Pizzapilot(); $plugin->run(); } pizzapilot_run();