• Resolved samuelimbert1985

    (@samuelimbert1985)


    Hello,

    We found a fatal error with the plugin :
    AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined method WC_Order_Refund::get_payment_method() in /wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php:848

    As mentioned here : https://github.com/woocommerce/woocommerce/issues/24531
    That is because WC_Order_Refund is an extension of WC_Abstract_Order and not WC_Order where the function is defined.

    I tried their solution and it seems to be working :
    before calling $order->get_payment_method()

    if ( is_a( $order, 'WC_Order_Refund' ) ) {
        $order = wc_get_order( $order->get_parent_id() );
    }
Viewing 1 replies (of 1 total)
  • Hi @samuelimbert1985

    I tried their solution and it seems to be working

    I understand that you got this fatal error, and could also find the cause behind it.

    Good to know that the solution is working for you – please let us know what issue are you still facing?

Viewing 1 replies (of 1 total)

The topic ‘WC_Order_Refund and get_payment_method’ is closed to new replies.