. * * @package Storebridge */ defined( 'ABSPATH' ) || exit; define( 'STOREBRIDGE_VERSION', '0.1.0' ); define( 'STOREBRIDGE_FILE', __FILE__ ); define( 'STOREBRIDGE_DIR', plugin_dir_path( __FILE__ ) ); define( 'STOREBRIDGE_URL', plugin_dir_url( __FILE__ ) ); // Override in wp-config.php for local development, e.g. http://host.docker.internal:8080. if ( ! defined( 'STOREBRIDGE_CLOUD_URL' ) ) { define( 'STOREBRIDGE_CLOUD_URL', 'https://api.storebridge.eu' ); } // Build flag deciding which checkout/upsell is shown: wporg | woomarketplace | tiktokstore. if ( ! defined( 'STOREBRIDGE_DISTRIBUTION' ) ) { define( 'STOREBRIDGE_DISTRIBUTION', 'wporg' ); } spl_autoload_register( static function ( string $class_name ): void { $prefix = 'Storebridge\\'; if ( ! str_starts_with( $class_name, $prefix ) ) { return; } $relative = str_replace( '\\', '/', substr( $class_name, strlen( $prefix ) ) ); $file = STOREBRIDGE_DIR . 'includes/' . $relative . '.php'; if ( is_readable( $file ) ) { require $file; } } ); require_once STOREBRIDGE_DIR . 'includes/License/freemius.php'; Storebridge\Compat\Features::register(); add_action( 'plugins_loaded', array( Storebridge\Plugin::instance(), 'boot' ) ); register_activation_hook( __FILE__, array( Storebridge\Admin\OnboardingNotices::class, 'activate' ) );