• Paul

    (@headwall)


    Hi

    There’s a problem in version 2.1.2:

    Wc_TrustPayments_Main::change_format_savecard() is registered on the global filter:

    add_filter( 'woocommerce_payment_gateway_get_saved_payment_method_option_html', array( $this, 'change_format_savecard' ), 10, 3 );

    When WooCommerce PayPal Payments renders a vaulted PayPal account, it passes a WooCommerce\PayPalCommerce\WcPaymentTokens\PaymentTokenPayPal token. That class extends WC_Payment_Token (not WC_Payment_Token_CC) and has no get_card_type(), so the request is fatal:

    PHP Fatal error: Uncaught Error: Call to undefined method
    WooCommerce\PayPalCommerce\WcPaymentTokens\PaymentTokenPayPal::get_card_type()
    in includes/class-trust-payments.php:572

    This was causing the client to lose sales.

    We’ve patched it for now – I’m happy to share our patch with you, if you want to review it?

    Paul

Viewing 1 replies (of 1 total)
  • Plugin Author Trust Payments

    (@trustpayments)

    Hi Paul,

    Thank you for bringing this to our attention.

    We’re aware of this issue and have a fix included in the next version of our plugin. If you’re able to share your patch to our support team referencing this thread, we’d be happy to verify it aligns with our fix ahead of the release.

    For future inquiries, support requests, or comments, we recommend contacting our support team directly at support@trustpayments.com. This allows us to provide you with formal and timely responses.
    We appreciate your cooperation and look forward to resolving your issue.
    Kind regards,
    Trust Payments

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.