Overview Defines tier pricing, VPS specs, and location rules. This class is the single source of truth for tier data. Constants DEFAULT_STARTER_CREDITS (float): Default credits for new customers. Methods get_tiers():...
Overview Describes Spawn plugin options used by provisioning, billing, domains, and auth. Options spawn_stripe_prices (array) Stripe price IDs keyed by vps_starter, vps_pro, vps_business. spawn_internal_api_key (string) Internal REST auth key. spawn_domain_markup...
Overview Schedules domain renewal checks and auto-refill handling, including reminder emails and auto-renewal workflows. Hooks spawn_domain_renewal_check (daily) spawn_credits_auto_refill_needed spawn_auto_refill_success spawn_auto_refill_failed Constants RENEWAL_HOOK (spawn_domain_renewal_check) Methods init(): void schedule_events(): void unschedule_events(): void...
Overview Provides CRUD operations for Spawn customers and stores provisioning, billing, and credit metadata in the wp_spawn_customers table. Table {$wpdb->prefix}spawn_customers Schema (selected fields): id bigint unsigned primary key user_id bigint...
Overview Adds the Spawn admin menu, renders settings and customer list, and registers plugin options. Settings Registered options: spawn_stripe_price_starter spawn_stripe_price_pro spawn_stripe_price_business spawn_namecom_username spawn_namecom_token spawn_sweatpants_url spawn_sweatpants_token spawn_opencode_server_url spawn_opencode_password spawn_google_client_id spawn_google_client_secret Methods...
Overview Returns customer subscription status, tier, and credit balance. Class SpawnAbilitiesAbility_Get_Status Method execute( array $input ): array|WP_Error Input { "customer_id": 123 } Output { "customer_id": 123, "email": "[email protected]", "domain": "example.com",...
Overview Returns usage period bounds, credit balance, and auto-refill flag. Class SpawnAbilitiesAbility_Get_Usage Method execute( array $input ): array|WP_Error Input { "customer_id": 123, "period": "current" } Output { "customer_id": 123, "credit_balance":...
Overview Returns the Stripe customer portal URL. Class SpawnAbilitiesAbility_Manage_Billing Method execute( array $input ): array|WP_Error Input { "customer_id": 123 } Output { "success": true, "portal_url": "https://billing.stripe.com/session/..." } Implementation $portal =...
Overview Creates a Stripe checkout session for domain renewal. Class SpawnAbilitiesAbility_Renew_Domain Method execute( array $input ): array|WP_Error Input { "customer_id": 123 } Output { "success": true, "checkout_url": "https://checkout.stripe.com/c/session/...", "session_id": "cs_...",...
Overview Resizes a customer's Hetzner VPS via the hcloud CLI. Class SpawnAbilitiesAbility_Scale_VPS Method execute( array $input ): array|WP_Error Input { "customer_id": 123, "new_tier": "cpx31" } Output { "success": true, "new_tier":...