register(); // Retention — the crown jewel (trigger → enrollment → execution). TriggerRegistry::instance()->register(); (new ExecutionService())->register(); // Payment — SEPA-first (Stripe). add_filter('woocommerce_payment_gateways', [$this, 'registerGateways']); // Stripe webhook — source of truth for async SEPA outcomes. (new WebhookHandler())->register(); // WooCommerce Blocks (Cart/Checkout block) — the default modern checkout. add_action('woocommerce_blocks_payment_method_type_registration', static function ($registry): void { if (class_exists(\Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType::class)) { $registry->register(new SepaBlocksSupport()); } }); // Product-level subscription config. (new SubscriptionProduct())->register(); // Admin. if (is_admin()) { (new SettingsPage())->register(); } } /** * @param array $gateways * @return array */ public function registerGateways(array $gateways): array { $gateways[] = SepaGateway::class; return $gateways; } }