true ) ); } ); return; } define( 'CORTEXCOMMERCE_FILE', __FILE__ ); require_once __DIR__ . '/vendor/autoload.php'; add_action( 'before_woocommerce_init', array( \CortexCommerce\Plugin::class, 'declare_wc_compatibility' ) ); register_activation_hook( __FILE__, array( \CortexCommerce\Lifecycle\ActivationGuard::class, 'on_activate' ) ); register_deactivation_hook( __FILE__, array( \CortexCommerce\Lifecycle\Disconnector::class, 'on_deactivate' ) ); // Right after WooCommerce's key authentication (priority 15), and registered now rather than on plugins_loaded // so no early wp_get_current_user() call can cache our key's owner before the scope check runs. add_filter( 'determine_current_user', array( \CortexCommerce\Rest\KeyScope::class, 'limit_login' ), 16 ); \CortexCommerce\Plugin::boot();