'; echo esc_html( sprintf( /* translators: %s: current PHP version */ __( 'Agent001 Support Assistant requires PHP 7.4 or newer. You are running PHP %s.', 'agent001-support-assistant-for-woocommerce' ), PHP_VERSION ) ); echo '

'; } ); return; } define( 'AGENT001_VERSION', '1.2.2' ); define( 'AGENT001_FILE', __FILE__ ); define( 'AGENT001_PATH', plugin_dir_path( __FILE__ ) ); define( 'AGENT001_URL', plugin_dir_url( __FILE__ ) ); define( 'AGENT001_BASENAME', plugin_basename( __FILE__ ) ); $agent001_autoload = AGENT001_PATH . 'vendor/autoload.php'; if ( ! file_exists( $agent001_autoload ) ) { add_action( 'admin_notices', static function (): void { if ( ! current_user_can( 'activate_plugins' ) ) { return; } echo '

'; echo esc_html__( 'Agent001 Support Assistant: Composer autoloader is missing. If you installed this plugin from source, run `composer install` inside the plugin directory.', 'agent001-support-assistant-for-woocommerce' ); echo '

'; } ); return; } require_once $agent001_autoload; add_action( 'before_woocommerce_init', static function (): void { if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); } } ); add_action( 'init', static function (): void { load_plugin_textdomain( 'agent001-support-assistant-for-woocommerce', false, dirname( AGENT001_BASENAME ) . '/languages' ); } ); register_activation_hook( __FILE__, [ \Agent001\Lifecycle::class, 'activate' ] ); register_deactivation_hook( __FILE__, [ \Agent001\Lifecycle::class, 'deactivate' ] ); add_action( 'plugins_loaded', static function (): void { \Agent001\Plugin::boot( AGENT001_PATH, AGENT001_URL, AGENT001_VERSION ); }, 20 );