' . esc_html__( 'Affireo - Affiliates for WooCommerce Pro is running, so the free version is idle. You can safely deactivate and delete the free plugin: your affiliates, commissions, and payouts are already being managed by Pro.', 'affireo-affiliates-for-woocommerce' ) . '

'; } ); return; } // Constants are defined only once the free edition knows it is the one // running: Pro declares the same names when it is active. define( 'PPL_AFW_VERSION', '1.3.1' ); define( 'PPL_AFW_FILE', __FILE__ ); define( 'PPL_AFW_DIR', plugin_dir_path( __FILE__ ) ); define( 'PPL_AFW_URL', plugin_dir_url( __FILE__ ) ); define( 'PPL_AFW_MIN_PHP', '7.4' ); define( 'PPL_AFW_MIN_WC', '8.0' ); if ( version_compare( PHP_VERSION, PPL_AFW_MIN_PHP, '<' ) ) { add_action( 'admin_notices', static function () { echo '

' . esc_html__( 'Affireo - Affiliates for WooCommerce requires PHP 7.4 or higher.', 'affireo-affiliates-for-woocommerce' ) . '

'; } ); return; } add_action( 'admin_notices', static function () { if ( class_exists( 'WooCommerce' ) || ! current_user_can( 'activate_plugins' ) ) { return; } echo '

' . esc_html__( 'Affireo - Affiliates for WooCommerce requires WooCommerce to be installed and active.', 'affireo-affiliates-for-woocommerce' ) . '

'; } ); require_once PPL_AFW_DIR . 'includes/class-ppl-afw-autoloader.php'; PPL_AFW_Autoloader::register(); require_once PPL_AFW_DIR . 'includes/class-ppl-afw-bootstrap.php'; register_activation_hook( __FILE__, array( 'PPL_AFW\\Core\\Install', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'PPL_AFW\\Core\\Install', 'deactivate' ) ); add_action( 'before_woocommerce_init', static function () { if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true ); } } ); add_action( 'plugins_loaded', 'ppl_afw', 5 );