Home Forums Plugins WooCommerce Notification Fix for uncaught error at line 409 in notify.php

Fix for uncaught error at line 409 in notify.php

  • Author
    Posts
  • #223651

    Brian Bailie
    Participant

    Hi,

    In notify.php an error can occur at line 409.
    Uncaught Error: Call to undefined method WC_Order_Refund::get_billing_first_name() if order is already refunded.

    $order->get_billing_first_name() throws error if order is already refunded.

    Tested Solution inserted after line 404 where you have a foreach( $orders as $order ) :

    if ( is_a( $order, ‘WC_Order_Refund’ ) ) {
    $order = wc_get_order( $order->get_parent_id() );
    }

    Please add this to the code for the updates, thanks!

    See: https://github.com/woocommerce/woocommerce/issues/24531

    Regards,
    -Brian Bailie

    Attachments:
    You must be logged in to view attached files.

You must be logged in to see replies to this topic. Click here to login or register