# Yeboyebo_HyvaCheckoutStripeFix

Why this module exists:

`vendor/hyva-themes/magento2-hyva-checkout-stripe/src/etc/frontend/di.xml`
declares 4 virtualTypes:

- `Hyva\CheckoutStripe\Magewire\View\PaymentRequestButtonCheckout`
- `Hyva\CheckoutStripe\Magewire\View\PaymentRequestButtonMinicart`
- `Hyva\CheckoutStripe\Magewire\View\PaymentRequestButtonCart`
- `Hyva\CheckoutStripe\Magewire\View\PaymentRequestButtonProduct`

In Magento 2.4.7-p8, the Compiled ObjectManager fails to resolve these virtualTypes when invoked from the Magewire `view_block_abstract_to_html_before` observer (`componentResolver->resolve($block)`), throwing "Class does not exist" CRITICAL errors that truncate the HTML response of /checkout/.

This module ships physical classes that extend `PaymentRequestButton`, allowing the autoloader to resolve them naturally. They keep the `Hyva\CheckoutStripe\Magewire\View\` namespace expected by the layout XMLs of Hyva_CheckoutStripe.

## How it works

PSR-4 mapping is added to the project root `composer.json`:

```json
"autoload": {
    "psr-4": {
        "Hyva\\CheckoutStripe\\Magewire\\View\\": "app/code/Yeboyebo/HyvaCheckoutStripeFix/StripeClasses/"
    }
}
```

After `composer dump-autoload`, the classes are picked up.

When Hyva updates upstream and adds the physical classes (or fixes the virtualType resolution), this module can be removed.
