Title: Error refunding
Last modified: May 9, 2024

---

# Error refunding

 *  Resolved [dev](https://wordpress.org/support/users/devksec/)
 * (@devksec)
 * [2 years ago](https://wordpress.org/support/topic/error-refunding/)
 * Hello,
 * Using the stripe payment plugin, we’ve setup a test donation however on refund
   it causes this critical error
 *     ```wp-block-code
       2024-05-09T10:57:47+00:00 Critical Uncaught Error: Call to undefined method Automattic\WooCommerce\Admin\Overrides\OrderRefund::get_billing_first_name() in /home/website/wp-content/plugins/wc-donation-platform/includes/class-wcdp_leaderboard.php:173
       Additional context
       {
       "error": {
       "type": 1,
       "file": "\/home\/website\/wp-content\/plugins\/wc-donation-platform\/includes\/class-wcdp_leaderboard.php",
       "line": 173
       },
       "backtrace": [
       "",
       "#0 \/home\/website\/wp-content\/plugins\/wc-donation-platform\/includes\/class-wcdp_leaderboard.php(105): WCDP_Leaderboard->get_orders_db()",
       "#1 \/home\/website\/wp-content\/plugins\/wc-donation-platform\/includes\/class-wcdp_leaderboard.php(85): WCDP_Leaderboard->get_orders()",
       "#2 \/home\/website\/wp-includes\/shortcodes.php(433): WCDP_Leaderboard->wcdp_leaderboard()",
       "#3 [internal function]: do_shortcode_tag()",
       "#4 \/home\/website\/wp-includes\/shortcodes.php(273): preg_replace_callback()",
       "#5 \/home\/website\/wp-includes\/class-wp-hook.php(324): do_shortcode()",
       "#6 \/home\/website\/wp-includes\/plugin.php(205): WP_Hook->apply_filters()",
       "#7 \/home\/website\/wp-includes\/post-template.php(256): apply_filters()",
       "#8 \/home\/website\/wp-content\/plugins\/woocommerce\/templates\/single-product\/tabs\/description.php(30): the_content()",
       "#9 \/home\/website\/wp-content\/plugins\/woocommerce\/includes\/wc-core-functions.php(345): include('\/home\/ksc5577p\/…')",
       "#10 \/home\/website\/wp-content\/plugins\/woocommerce\/includes\/wc-template-functions.php(1879): wc_get_template()",
       "#11 \/home\/website\/wp-content\/plugins\/commercegurus-commercekit\/includes\/templates\/commercekit-tabs.php(76): woocommerce_product_description_tab()",
       "#12 \/home\/website\/wp-content\/plugins\/woocommerce\/includes\/wc-core-functions.php(345): include('\/home\/ksc5577p\/…')",
       "#13 \/home\/website\/wp-content\/plugins\/woocommerce\/includes\/wc-template-functions.php(1641): wc_get_template()",
       "#14 \/home\/website\/wp-includes\/class-wp-hook.php(324): woocommerce_output_product_data_tabs()",
       "#15 \/home\/website\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()",
       "#16 \/home\/website\/wp-includes\/plugin.php(517): WP_Hook->do_action()",
       "#17 \/home\/website\/wp-content\/plugins\/woocommerce\/templates\/content-single-product.php(72): do_action()",
       "#18 \/home\/website\/wp-includes\/template.php(812): require('\/home\/ksc5577p\/…')",
       "#19 \/home\/website\/wp-content\/plugins\/woocommerce\/includes\/wc-core-functions.php(284): load_template()",
       "#20 \/home\/website\/wp-content\/plugins\/woocommerce\/templates\/single-product.php(37): wc_get_template_part()",
       "#21 \/home\/website\/wp-includes\/template-loader.php(106): include('\/home\/ksc5577p\/…')",
       "#22 \/home\/website\/wp-blog-header.php(19): require_once('\/home\/ksc5577p\/…')",
       "#23 \/home\/website\/index.php(17): require('\/home\/ksc5577p\/…')",
       "#24 {main}",
       "thrown"
       ]
       }
       ```
   
    -  This topic was modified 2 years ago by [dev](https://wordpress.org/support/users/devksec/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Jonas](https://wordpress.org/support/users/flinnn/)
 * (@flinnn)
 * [2 years ago](https://wordpress.org/support/topic/error-refunding/#post-17752718)
 * Hi devksec,
 * Thanks for reporting this issue. Did this error pop up just once or multiple 
   times?
 * Best, Jonas
 *  Thread Starter [dev](https://wordpress.org/support/users/devksec/)
 * (@devksec)
 * [2 years ago](https://wordpress.org/support/topic/error-refunding/#post-17754677)
 * Hello,
 * It’s persistent and we have to delete the affected order or the site breaks entirely.
 *  Plugin Author [Jonas](https://wordpress.org/support/users/flinnn/)
 * (@flinnn)
 * [2 years ago](https://wordpress.org/support/topic/error-refunding/#post-17754743)
 * Thanks for the clarification.
   I’m not sure how this error can happen and I was
   not able to reproduce it (the code only queries completed orders so orders with
   the status refunded should always be excluded). I have now made this change that
   should resolve the issue: [https://github.com/jonas-hoebenreich/wc-donation-platform/commit/2e2f2c7dc5794c3542e24b31384a2623eccbc983](https://github.com/jonas-hoebenreich/wc-donation-platform/commit/2e2f2c7dc5794c3542e24b31384a2623eccbc983)
   You can already test it out: [https://wcdp.jonh.eu/documentation/support/installing-the-latest-development-version-of-donation-platform-for-woocommerce-wordpress-plugin-from-github/](https://wcdp.jonh.eu/documentation/support/installing-the-latest-development-version-of-donation-platform-for-woocommerce-wordpress-plugin-from-github/)
 * Best, Jonas

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error refunding’ is closed to new replies.

 * ![](https://ps.w.org/wc-donation-platform/assets/icon.svg?rev=2611888)
 * [Donation Platform for WooCommerce: Fundraising & Donation Management](https://wordpress.org/plugins/wc-donation-platform/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-donation-platform/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-donation-platform/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-donation-platform/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-donation-platform/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-donation-platform/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jonas](https://wordpress.org/support/users/flinnn/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/error-refunding/#post-17754743)
 * Status: resolved